- 安装windows服务
nexus /install - 启动nexus服务
- 访问http://localhost:8081/
右上角登陆,提示admin密码在某个文件,查看并输入即可 - 配置maven
配置文件 ~/.m2/settings.xml
4.1 配置下载依赖时,使用本地的nexus私有仓库
<mirrors>
<mirror>
<id>local-nexus</id>
<mirrorOf>*</mirrorOf>
<name>local maven repository</name>
<url>http://localhost:8081/repository/maven-public/</url>
</mirror>
</mirrors>
4.1 为了能上传一些jar包到releases或snapshots仓库,需要做以下配置
<profiles>
<profile>
<id>dev</id>
<repositories>
<repository>
<id>nexus-releases</id>
<url>http://localhost:8081/repository/maven-releases/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>nexus-snapshots</id>
<url>http://localhost:8081/repository/maven-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
<servers>
<server>
<id>nexus-releases</id>
<username>admin</username>
<password>password</password>
</server>
<server>
<id>nexus-snapshots</id>
<username>admin</username>
<password>password</password>
</server>
</servers>
原文地址:https://www.cnblogs.com/byrxiaochun/p/12150704.html
时间: 2024-10-10 14:28:14