maven3.8.1安装及配置流程

maven3.8.1安装及配置流程

1、解压apache-maven-3.8.1-bin.zip到指定目录
  • 我这里是解压到:C:\sofeware\tools\mvn\apache-maven-3.8.1
2、配置环境变量
  • 右击此电脑–>选择属性–>高级系统设置–>选择右下角的环境变量–>选择系统变量

    –>新建MAVEN_HOME变量值就是你的maven的解压目录我这里是:C:\sofeware\tools\mvn\apache-maven-3.8.1–>找到path增加一条环境变量:%MAVEN_HOME%\bin–>保存退出;
    maven3.8.1安装及配置流程_第1张图片

    maven3.8.1安装及配置流程_第2张图片

    maven3.8.1安装及配置流程_第3张图片

    maven3.8.1安装及配置流程_第4张图片

3、win+r输入cmd 双击打开cmd输入mvn -v会输出以下结果

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-beIkcadQ-1627025443765)(C:\文档\md_photo\1625453924348.png)]

4、settings的配置

  • setting 文件在apache-maven-3.8.1\conf里边我的setting文件的位置是C:\sofeware\tools\mvn\apache-maven-3.8.1\conf,在修改setting文件之前需要保留副本,避免配置出错无法恢复之前的版本





<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 http://maven.apache.org/xsd/settings-1.2.0.xsd">
  
  
  <localRepository>C:\sofeware\tools\mvn\RespositorylocalRepository>

  

  
<offline>tureoffline>
  
  <pluginGroups>
    
  pluginGroups>

  
  <proxies>
    
  proxies>

  
  <servers>
    

    
  servers>

  
  <mirrors>
    
	 
    <mirror>
      <id>alimavenid>
      <mirrorOf>centralmirrorOf>
      <name>aliyun mavenname>
      <url>https://maven.aliyun.com/repository/centralurl>
    mirror>
  mirrors>

  
  <profiles>
    
      
		<profile>
            <repositories>
                <repository>
                    <id>nexusid>
                    <name>createdbymyselfname>
                    <url>http://maven.oschina.net/content/groups/public/url>
                    <releases>
                        <enabled>trueenabled>
                    releases>
                    <snapshots>
                        <enabled>falseenabled>
                    snapshots>
                repository>
            repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>nexusid>
                    <name>createdbymyselfname>
                    <url>http://maven.oschina.net/content/groups/public/url>
                    <releases>
                        <enabled>trueenabled>
                    releases>
                    <snapshots>
                        <enabled>falseenabled>
                    snapshots>
                pluginRepository>
            pluginRepositories>
        profile>
		
		
		<profile>
		  <id>jdk-1.8id>
		  <activation>
			<activeByDefault>trueactiveByDefault>
			<jdk>1.8jdk>
		  activation>

		  <properties>
			<maven.compiler.source>1.8maven.compiler.source>
			<maven.compiler.target>1.8maven.compiler.target>
			<maven.compiler.compilerVersion>1.8maven.compiler.compilerVersion>
		  properties>
	profile>
    
  profiles>

  
settings>

ance


–>


你可能感兴趣的:(软件安装,maven,java,maven)