标签:01 central repository nexus 192.168 3.17 maven http
1.解压后执行 nexus.exe /run 启动私服服务 2.打开 192.168.1.21:8081 进入私服管控台 2.1.在 sonatype-work\nexus3 下查看 admin.password 密码并 sign in 进行修改 (test password nexus) 3.在 Repository -> Repositories -> maven-central 下添加阿里仓库远程代理 https://maven.aliyun.com/nexus/content/groups/public/ 4.maven settings.xml 配置 <mirrors> <!-- 阿里云仓库 <mirror> <id>alimaven</id> <mirrorOf>central</mirrorOf> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/repositories/central/</url> </mirror> --> <!-- 中央仓库1 <mirror> <id>repo1</id> <mirrorOf>central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://repo1.maven.org/maven2/</url> </mirror> --> <!-- 中央仓库2 <mirror> <id>repo2</id> <mirrorOf>central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://repo2.maven.org/maven2/</url> </mirror> --> <mirror> <id>public</id> <mirrorOf>central</mirrorOf> <name>central repository</name> <url>http://192.168.1.21:8081/repository/maven-public/</url> </mirror> </mirrors> <profile> <id>nexusProfile</id> <repositories> <repository> <id>nexus</id> <name>nexus</name> <url>http://192.168.1.21:8081/repository/maven-central/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> </profile> <activeProfiles> <activeProfile>nexusProfile</activeProfile> </activeProfiles> <servers> <server> <id>releases</id> <username>admin</username> <password>nexus</password> </server> <server> <id>snapshots</id> <username>admin</username> <password>nexus</password> </server> </servers> 5.pom.xml 配置 <distributionManagement> <repository> <id>releases</id> <name>User Project RELEASES</name> <url>http://192.168.1.21:8081/repository/maven-releases/</url> </repository> <snapshotRepository> <id>snapshots</id> <name>User Project SNAPSHOTS</name> <url>http://192.168.1.21:8081/repository/maven-snapshots/</url> </snapshotRepository> </distributionManagement> 6.deploy 模块 7.在 Browse -> maven-releases 中查看发布的模块
标签:01,central,repository,nexus,192.168,3.17,maven,http 来源: https://www.cnblogs.com/xiayudashan/p/11081812.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。