nexus下载
1.指定下载目录
cd /usr/local/nexus
cd nexus
2.解压一个nexus包。
tar -xf nexus-3.58.1-02-unix.tar.gz
cd nexus-3.58.1-02/bin
3.vim /etc/profile.d/nexus.sh
export MAVEN_HOME=/usr/local/nexus/nexus-3.58.1-02
export PATH=$PATH:$MAVEN_HOME/bin
source /etc/profile.d/nexus.sh
nexus start
nexus status
nexus restart/stop4.查看密码所在地方
/usr/local/nexus/sonatype-work/nexus3
5.maven配置setting文件<server>
<id>any</id>
<username>admin</username>
<password>xxx</password>
</server><server>
<id>any-releases</id>
<username>admin</username>
<password>xxx</password>
</server><server>
<id>any-snapshots</id>
<username>admin</username>
<password>xxx</password>
</server>
</servers><!-- 配置本地仓库资源来源 -->
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>https://repo.maven.apache.org/maven2/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>6.setting和pom都要配置
<distributionManagement>
<repository>
<id>releases</id>
<name>ldjr Repository</name>
<url>http://192.168.1.11:8083/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>Nexus Snapshots Repository</name>
<uniqueVersion>false</uniqueVersion>
<url>http://192.168.1.11:8083/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
nexus部署
最新推荐文章于 2024-07-31 18:38:45 发布