setting.xml的配置
这个配置表示,你的私服账号信息,并设置一个id,通过id来区别多个私服
<server>
<id>nexus</id>
<username>admin</username>
<password>admin123</password>
</server>
完整命令
mvn deploy:deploy-file -DgroupId=org.springframework.boot -DartifactId=spring-boot-starter-web -Dversion=2.1.6.RELEASE -Dpackaging=jar -Dfile=spring-boot-starter-web-2.1.6.RELEASE.jar -Durl=http://192.168.1.32:8081/repository/maven-releases/ -DrepositoryId=nexus
Durl,可以在nexus 的 repository中找到地址,并复制粘贴,如果没看到,可能权限不够
DrepositoryId,前面配置的server里面的id