注意事项
Mac OS
$ tar -zxvf ~/dev/doc/apache-maven-3.5.4-bin.tar.gz -C ~/dev/tools/
$ mv ~/dev/tools/apache-maven-3.5.4/ ~/dev/tools/maven-3.5.4
$ ln -s ~/dev/tools/maven-3.5.4/ ~/dev/tools/maven
$ vim ~/.bash_profile
export M2_HOME=/home/user000/tools/maven
export PATH=$PATH:$M2_HOME/bin
$ source ~/.bash_profile
$ mvn -v
$ vim ~/dev/tools/maven/conf/settings.xml
配置默认JDK版本
<profile>
<id>jdk-1.8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>
阿里云镜像
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
网友评论