maven nexus 部署

本文介绍如何部署Nexus并将其与Maven集成。包括Nexus的安装步骤、配置及浏览器访问方式;Maven的安装配置、环境变量设置、与Nexus集成的方法以及与Eclipse集成的过程。

一.nexus部署
  1>.下载安装包【nexus-2.14.1-01-bundle.zip】
  2>.安装nexus【E:\Linux\nexus-2.14.1-01-bundle\nexus-2.14.1-01\bin\jsw\windows-x86-64】,依次运行以下两个批处理
    install-nexus.bat
    start-nexus.bat
  3>.部署完后浏览器【http://localhost:8081/nexus/#welcome】
  用户名:admin/admin123

二.maven安装与nexus集成

  1>.apache 官网下载mavn 组件【apache-maven-3.3.9-bin.zip】
    我的解压到:E:\Linux\apache-maven-3.3.9-bin
  2>.配置环境变量【MAVEN_HOME=F:\Maven\apache-maven-3.0.4-bin\apache-maven-3.0.4,Path配置】
  3>.cmd检查环境变量配置是否成功mvn -version
  4>.maven与nexus集成
  修改配置文件【E:\Linux\apache-maven-3.3.9-bin\conf\settings.xml】,修改内容如下:
  

<mirror>

<id>nexus</id>

<mirrorOf>*</mirrorOf>

<url>http://localhost:8081/nexus/content/groups/public</url>

</mirror>

<profile>

<id>nexus</id>

<repositories>

<repository>

<id>central</id>
<url>http://central</url>
<releases>
<enabled>true</enabled></releases>
<snapshots><enabled>true</enabled>
</snapshots>  

</repository>
</repositories>

<pluginRepositories>

<pluginRepository>
<id>central</id>

<url>http://central</url>

<releases>

<enabled>true</enabled>

</releases>

<snapshots>

<enabled>true</enabled>

</snapshots>

</pluginRepository>

</pluginRepositories>

</profile>



<activeProfiles>

<activeProfile>nexus</activeProfile>

</activeProfiles>

  

  5>.与eclipse集成:--->Windows-->Prerences-->Maven-->User settings
  User settings选项改为:E:\Linux\apache-maven-3.3.9-bin\conf\settings.xml

  6>.创建maven 项目,pom.xml手动增加节点依赖,如果没有jar文件会在progress 中有下载

转载于:https://www.cnblogs.com/zhangxiaolin/p/6586452.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值