实习笔记之nexus maven私服搭建

来源:互联网 发布:wp 利用 知乎 编辑:程序博客网 时间:2024/06/09 13:57

1.下载 并安装nexus
2.运行私服nexus-2.14.4-03\bin\jsw\选择系统\:
这里写图片描述
3.运行网址并登录:http://127.0.0.1:8081/nexus
这里写图片描述
4.打开自动down包:
这里写图片描述
5.打开保存的仓库组
这里写图片描述
6配置maven setting.xml:

<server>          <id>nexus-releases</id>          <username>admin</username>          <password>admin123</password>        </server>        <server>          <id>nexus-snapshots</id>          <username>admin</username>          <password>admin123</password>        </server>   <mirror>           <id>nexus-releases</id>           <mirrorOf>*</mirrorOf>           <url>http://localhost:8081/nexus/content/groups/public</url>         </mirror>        <mirror>           <id>nexus-snapshots</id>           <mirrorOf>*</mirrorOf>           <url>http://localhost:8081/nexus/content/repositories/snapshots/</url>         </mirror>  <activeProfiles><!--激活了才生效-->   <activeProfile>nexusProfile</activeProfile>    </activeProfiles>**7.配置pom.xml 博客编辑器有问题**<distributionManagement>    <repository>        <id>nexus-releases</id>        <name>nexus</name>        <url>http://192.168.1.184:8081/nexus/content/groups/public/</url>    </repository>    <snapshotRepository>        <id>nexus-snapshots</id>        <name>snapshots</name>        <url>http://192.168.1.184:8081/nexus/content/repositories/snapshots/</url>    </snapshotRepository></distributionManagement>  <repositories>        <repository>            <id>nexus</id>            <name>nexus</name>            <url>http://192.168.1.184:8081/nexus/content/groups/public/</url>            <releases>                <enabled>true</enabled>            </releases>            <snapshots>                <enabled>true</enabled>            </snapshots>        </repository>    </repositories>

然后就能用了。组员直接down:pom.xml就好了,能打包,有需要联系309947442