Maven配置
1.添加服务库登录名密码
1 <server> 2 <id>snapshots</id> 3 <username>userName</username> 4 <password>password</password> 5 </server>
2.上传远程仓库地址和属性配置
1 <profile> 2 <id>snapshots</id> 3 <repositories> 4 <repository> 5 <id>snapshots</id> 6 <url>http://192.168.3.21:81/nexus/content/repositories/snapshots</url> 7 <releases> 8 <enabled>true</enabled> 9 </releases> 10 <snapshots> 11 <enabled>true</enabled> 12 </snapshots> 13 </repository> 14 </repositories> 15 </profile>
3.settings 内属性配置启动库build
1 <activeProfiles> 2 <activeProfile>snapshots</activeProfile> 3 </activeProfiles>
4.mvn 命令行上传命令
C:\Users\admin>mvn deploy:deploy-file -DgroupId=iTouch.framework -DartifactId=data -Dversion=0.0.1-SNAPSHOT -Dpackaging=jar -Dfile=F:\iTouch-data-1.2.01.jar -Durl =http://192.168.3.21:81/nexus/content/repositories/snapshots -DrepositoryId=s napshots