中央仓库修改:
<mirror>
<id>central</id>
<mirrorOf>*</mirrorOf>
<name>localhost</name>
<url>http://192.168.0.30:8081/nexus/content/groups/public/</url>
</mirror>
阿里中央仓库
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
系统配置
set M2_HOME =D:\java\maven\apache-maven-3.3.9
set path=%M2_HOME%\bin;%path%
edit conf/settings.xml
<localRepository>D:\java\maven\.m2\repository</localRepository>
eclipse配置
/installations ->set installations home
/user settings ->set the global settings
私服
edit the hosts file
C:\Windows\System32\drivers\etc
60.169.80.95 nexus
测试,打开cmd.exe
输入mvn -v
运行
指定端口运行_Goals值中 -Dmaven.tomcat.port=8081 tomcat:run
代码生成: domain层 运行 mybatis-generator:generate
打包:clean -P test package
maven常见配置
最新推荐文章于 2024-10-05 22:46:21 发布