安装:
下载地址: https://www.sonatype.com/oss-thank-you-win64.zip
环境:java8+
解压目录:D:\workspace\nexus\->D:\workspace\nexus\nexus-3.12.1-01-win64\nexus-3.12.1-01\bin(nexus-3.12.1-01-win64该目录建议有)。
注册服务:管理员cmd->切换到bin目录(D:\workspace\nexus\nexus-3.12.1-01-win64\nexus-3.12.1-01\bin)->nexus /install('/'要有)
删除服务:nexus / uninstall
启动服务:net start nexus
停止服务:net stop nexus
用来存储本地发布的jar
pom中配置:
下载地址: https://www.sonatype.com/oss-thank-you-win64.zip
环境:java8+
解压目录:D:\workspace\nexus\->D:\workspace\nexus\nexus-3.12.1-01-win64\nexus-3.12.1-01\bin(nexus-3.12.1-01-win64该目录建议有)。
注册服务:管理员cmd->切换到bin目录(D:\workspace\nexus\nexus-3.12.1-01-win64\nexus-3.12.1-01\bin)->nexus /install('/'要有)
删除服务:nexus / uninstall
启动服务:net start nexus
停止服务:net stop nexus
访问:http://localhost:8081/ 用户名:admin 密码:admin123
代理仓库:
代理远程仓库,从远程仓库获取数据。
使用:在本地maven的settings中的配置如下:
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>nexus</id>
<name>Nexus</name>
<url>http://localhost:8081/repository/maven-public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>nexus</id>
<name>Nexus</name>
<url>http://localhost:8081/repository/maven-public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
宿主仓库:
用来存储本地发布的jar
pom中配置:
<distributionManagement>
<repository>
<id>nexus-releases</id>
<name>Nexus Releases Repository</name>
<url>http://localhost:8081/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>nexus-snapshot</id>
<name>Nexus snapshot Repository</name>
<url>http://localhost:8081/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
settings中配置:
<server>
<id>nexus-releases</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>nexus-snapshot</id>
<username>admin</username>
<password>admin123</password>
</server>