- 私服环境搭建
- nexus搭建
- https://www.cnblogs.com/sybblogs/p/9835977.html
- https://blog.csdn.net/chenfei2341/article/details/80431700
- https://www.cnblogs.com/qdhxhz/p/9801325.html
- admin/admin123 默认密码为当nexus解压之后会有两个文件夹nexus3.x和sonatype-work
- 默认的密码在sonatype-work文件夹下,会有一个admin.password,登录后修改
- 集成本地maven
- 修改nexus默认密码
- 更改配置
[root[@localhost](https://my.oschina.net/u/570656) etc]# pwd /usr/local/jysemel/sonatype-work/nexus3/etc [root[@localhost](https://my.oschina.net/u/570656) etc]# [root[@localhost](https://my.oschina.net/u/570656) etc]# [root[@localhost](https://my.oschina.net/u/570656) etc]# [root[@localhost](https://my.oschina.net/u/570656) etc]# cat nexus.properties # Jetty section application-port=8081 application-host=0.0.0.0 # nexus-args=${jetty.etc}/jetty.xml,${jetty.etc}/jetty-http.xml,${jetty.etc}/jetty-requestlog.xml nexus-context-path=/nexus # Nexus section # nexus-edition=nexus-pro-edition # nexus-features=\ # nexus-pro-feature # nexus.hazelcast.discovery.isEnabled=true [root@localhost etc]#
- 更改maven setting文件
<servers> <server> <id>qg-Nexus</id> <username>admin</username> <password>9d276ebb-821b-4b2e-a5a2-6edda45c0be3</password> </server> </servers> <mirror> <id>qg-Nexus</id> <name>Nexus Mirror</name> <url>http://192.168.30.114:8081/nexus/repository/maven-public/</url> <mirrorOf>*</mirrorOf> </mirror> <mirror> <id>nexus-aliyun</id> <mirrorOf>central</mirrorOf> <name>Nexus aliyun</name> <url>http://maven.aliyun.com/nexus/content/groups/public</url> </mirror> <profile> <activation> <!-- 默认激活此 profile --> <activeByDefault>true</activeByDefault> </activation> <repositories> <repository> <id>qg-Nexus</id> <name>central</name> <url>http://192.168.30.114:8081/nexus/repository/maven-public/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>qg-Nexus</id> <name>central</name> <url>http://192.168.30.114:8081/nexus/repository/maven-public/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> </pluginRepositories> </profile>
- 项目中pom配置
<distributionManagement> <snapshotRepository> <id>qg-Nexus</id> <name>snapshot repository</name> <url>http://192.168.30.114:8081/nexus/repository/maven-snapshots/</url> </snapshotRepository> <repository> <id>qg-Nexus</id> <name>releases repository</name> <url>http://192.168.30.114:8081/nexus/repository/maven-releases/</url> </repository> </distributionManagement>
来源:oschina
链接:https://my.oschina.net/kcnf/blog/3166364