1、获取maven 压缩包解压
修改配置文件 settings.xml
D:\Program Files\apache-maven-3.0.5\conf\settings.xml
<!-- 本地仓库地址设置 -->
<localRepository>D:\ProgramData\Maven Local Repository</localRepository>
<!-- 1、本地配置的远程中央存储仓库 -->
<mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<name>Company</name>
<url>http://203.110.176.176:7081/nexus/content/groups/public/</url>
</mirror>
<mirror>
<id>alimaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</mirror>
</mirrors>
<!-- 2、本地配置的中央存储仓库 -->
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>local-nexus</id>
<url>http://172.16.0.29:7081/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
<!-- 3、服务器服务名称 -->
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
2、环境变量配置
win 10 不支持 %JAVA_HOME%,需要配置绝对路径
image.png
命令cmd 输入 mvn -v 看是否配置成功
image.png
3、打包
image.png
获取文件夹
cd script
获取文件内容
./run.bat
网友评论