cd /usr/local/nexus/nexus-3.62/bin
./nexus start
./nexus status
curl 'localhost:8081'
cd /usr/local/nexus/sonatype-work/nexus3/log
cat nexus.log
cd /usr/local/nexus/sonatype-work/nexus3
cat admin.password
cd /usr/local/nexus/nexus-3.62/etc
cp nexus-default.properties nexus-default.properties.bak
vim nexus-default.properties
<!--Nexus仓库配置,id可以随便取一个,mirrorOf不能随便写-->
<mirror>
<id>test</id>
<mirrorOf>*</mirrorOf>
<name>Nexus仓库配置</name>
<url>http://192.168.19.130:8081/repository/maven-public/</url>
</mirror>
<!--阿里云镜像 -->
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里云公共仓库</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
<!--腾讯云镜像 -->
<mirror>
<id>nexus-tencentyun</id>
<mirrorOf>*</mirrorOf>
<name>Nexus tencentyun</name>
<url>http://mirrors.cloud.tencent.com/nexus/repository/maven-public/</url>
</mirror>
<server>
<id>test</id>
<username>admin</username>
<password>atguigu</password>
</server>
<server>
<id>test</id>
<username>admin</username>
<password>atguigu</password>
</server>
<distributionManagement>
<repository>
<!--注意这个id一定要填写我们maven的setting.xml当中配置的id-->
<id>test</id>
<url>http://192.168.19.130:8081/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<!--注意这个id一定要填写我们maven的setting.xml当中配置的id-->
<id>test</id>
<url>http://192.168.19.130:8081/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
mvn clean deploy -DskipTests
<version>1.0</version> 会被上传到maven-releases
<version>1.0-SNAPSHOT</version> 会被上传到maven-snapshots