nexus 搭建私服简单步骤
2016-04-12 10:44
330 查看
1. 下载nexus:http://www.sonatype.org/nexus/go, 我下载的是nexus-2.12.1-01-bundle.zip
2. 解压缩包到本地,包含两个文件夹:nexus-2.12.1-01, sonatype-work
3. 进入文件夹:nexus-2.12.1-01\bin\jsw\windows-x86-64, 启动nexus
C:\software\apache-maven-3.3.9\nexus-2.12.1-01\bin\jsw\windows-x86-64>console-nexus
4. open site: http://localhost:8081/nexus/
5. login with: admin/admin123
6. set true to 'download remote indexes'
7 method 1
7.1. modify project pom.xml
7.2. execute command:
C:\software\apache-maven-3.3.9\lyrepo\my-webapp>mvn compile
will retrieve the jars from http://localhost:8081/nexus
8. method 2: using mirror
8.1 set settings.xml
8.2. execute command:
C:\software\apache-maven-3.3.9\lyrepo\my-webapp>mvn compile
will retrieve the jars from http://localhost:8081/nexus
2. 解压缩包到本地,包含两个文件夹:nexus-2.12.1-01, sonatype-work
3. 进入文件夹:nexus-2.12.1-01\bin\jsw\windows-x86-64, 启动nexus
C:\software\apache-maven-3.3.9\nexus-2.12.1-01\bin\jsw\windows-x86-64>console-nexus
4. open site: http://localhost:8081/nexus/
5. login with: admin/admin123
6. set true to 'download remote indexes'
7 method 1
7.1. modify project pom.xml
<repositories> <repository> <id>nexus</id> <name>Team Nexus Repository</name> <url>http://localhost:8081/nexus/content/groups/public</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>nexus</id> <name>Team Nexus Repository</name> <url>http://localhost:8081/nexus/content/groups/public</url> </pluginRepository> </pluginRepositories> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> </dependencies> |
C:\software\apache-maven-3.3.9\lyrepo\my-webapp>mvn compile
will retrieve the jars from http://localhost:8081/nexus
8. method 2: using mirror
8.1 set settings.xml
<mirror> <id>my-org-repo</id> <name>Repository in My Orgnization</name> <url>http://localhost:8081/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> |
C:\software\apache-maven-3.3.9\lyrepo\my-webapp>mvn compile
will retrieve the jars from http://localhost:8081/nexus
相关文章推荐
- CCTray如何添加远程服务器
- Slim安装以及使用【转】
- 1336 - Sigma Function
- Js Map 和 List的简单实现
- 预处理器标识#error的目的是什么
- 腾讯后台研发实习岗二面
- apache安装
- Android编程中Activity的四种启动模式
- Java就业面试题大全
- 简单的线程池
- LeetCode 238 Product of Array Except Self
- Unity3D 学习笔记8 —— UGUI控制和按钮的监听系统
- C#中的委托和事件
- eclipse插件的文件更新事件执行流程
- Android断网后让用户进入到系统设置界面设置网络
- matlab矩阵操作
- CentOS源 Ubuntu 源 OpenSUSE-----持续汇总
- 高性能MySQL笔记-第5章Indexing for High Performance-002Hash indexes
- MySQL主键学习总结
- IOS手指触摸滑动