nexnus搭建maven私服配置导包
nexnus搭建maven私服配置导包
安装配置
下载安装包
sudo wget https://sonatype-download.global.ssl.fastly.net/nexus/3/nexus-3.3.1-01-unix.tar.gz
安装运行
tar zxvf nexus-3.3.1-01-unix.tar.gz cd nexus-3.3.1-01/ nohup ./nexus run
maven setting.xml配置
<servers> <server> <id>nexus</id> <username>admin</username> <password>admin123</password> </server> </servers>
pom.xml配置
<repositories> <repository> <id>nexus</id> <name>Team Nexus Repository</name> <url>http://10.2.6.1:8081/repository/maven-public/</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>nexus</id> <name>Team Nexus Repository</name> <url>http://10.2.6.1:8081/repository/maven-public/</url> </pluginRepository> </pluginRepositories>
mvn deploy使用
mvn deploy:deploy-file -DgroupId=${groupId} -DartifactId=${artifactId} -Dversion=${version} -Dpackaging=jar -Dfile=${path/*.jar} -Durl=http://10.2.6.1:8081/repository/thirdparty/ -DrepositoryId=nexus
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 编程私厨!