Nexus OSS 系统搭建
来源:互联网 发布:水准仪测量数据图片 编辑:程序博客网 时间:2024/06/05 16:25
- 下载Nexus OSS.
- 从sonatype下载.本次我们下载的是zip包.
- 注意一点,如果想搭建maven的本地库需要2.X版本,而不是3.X版本
设置JDK。
Nexus Repository Manager requires a Java 8 Runtime Environment (JRE) from Oracle.
如果有多个jdk或者jre的时候,需要在脚本中设置.
To set the path for a specific Java location open the bin/nexus script and locate the line INSTALL4J_JAVA_HOME_OVERRIDE. Remove the hash and specify the location of your JDK/JRE.
解压下载的压缩包。
因为我们本地的是1.6,但是我们有1.8,所以修改nexus的配置文件。对应到windows的是%nexus_home%/bin/nexus.vmoptions.我们可以增加一个参数:- 1
- 2
- 1
- 2
启动nexus oss。
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
使用页面访问,默认的访问地址是:http://localhost:8081/,可以匿名访问,也可以使用默认的用户名和密码访问,admin/admin123
接下来我们就可以集成Maven了。
可以从Sonatype上的github上下载例子,然后导入到eclipse中。
根据那个我们修改我们原来的setting.xml。这是client的配置,oss nexus我们使用了默认的存储。在2.0的时候,server使用的是文件,但是在3.0时候换成blob,就算是host的repository,存储也要使用blob。- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 然后我们就可以在eclipse中导入simple project,之后看pom.xml配置的依赖能否正常下载。
问题总结:
- 在eclipse的选择maven->update project时候,发现还是提示missing jar之类的错误,不能下载。查了好多网页,都说是防火墙的问题。后来看setting中的repository地址有点不太像,放到chrome一访问,果断提示404.更改repository之后就好了.
具体报的错误是:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-help-plugin:2.2:system (default-cli) on project standalone-pom: Execution default-cli of goal org.apache.maven.plugins:maven-help-plugin:2.2:system failed: Plugin org.apache.maven.plugins:maven-help-plugin:2.2 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-help-plugin:jar:2.2 -> org.apache.maven.plugin-tools:maven-plugin-tools-api:jar:2.4.3: Failed to read artifact descriptor for org.apache.maven.plugin-tools:maven-plugin-tools-api:jar:2.4.3: Failure to find org.apache.maven:maven-parent:pom:8 in `http://127.0.0.1:8081/nexus/content/groups/public` was cached in the local repository, resolution will not be reattempted until the update interval of roger-nexus has elapsed or updates are forced -> [Help 1]org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-help-plugin:2.2:system (default-cli) on project standalone-pom: Execution default-cli of goal org.apache.maven.plugins:maven-help-plugin:2.2:system failed: Plugin org.apache.maven.plugins:maven-help-plugin:2.2 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-help-plugin:jar:2.2 -> org.apache.maven.plugin-tools:maven-plugin-tools-api:jar:2.4.3
测试方法:打开eclipse的maven->debug maven output,然后执行maven的maven test. - 注意一点,如果想搭建maven的本地库需要2.X版本,而不是3.X版本
阅读全文
0 0
- Nexus OSS 系统搭建
- Nexus OSS 3.0 Maven搭建
- linux部署Nexus OSS
- Nexus OSS 3 搭建并配置使用 Docker & Git LFS 仓库
- Nexus OSS的安装、使用
- nexus搭建
- Nexus搭建
- Nexus 搭建
- Windows10 下安装 Nexus OSS 3.xx
- Maven Nexus OSS 2.xx 教程
- Sonatype Nexus OSS 3.2.1安装
- Windows下安装Nexus OSS 3.4.0
- Nexus Repository Manager OSS 3的好处
- ubuntu系统上,用nexus搭建maven私服
- nexus私服创建(OSS 3.1.0-0.4)
- 如何安装Nexus Repository Manager OSS 3.x
- Nexus OSS私服仓库的安装和配置
- Nexus OSS私服仓库的备份与迁移
- vim常用操作和使用技巧
- python --format
- 1036. 跟奥巴马一起编程(15) PAT
- submodule集成第三方库
- 存储过程基本知识
- Nexus OSS 系统搭建
- 算法 常见的排序算法
- 第二集SystemUI的启动
- Spark Q&A : Spark利用databricks读取CSV文件报错 CSVFormat NoClassDefFoundError
- 图像的阈值以及滑动条的建立
- vue cli 项目结构
- ROS 不能再详细的安装教程16.04+kinetic
- linux下热插拔事件的产生是怎样通知到用户空间,kobject_uevent_env之uevent_helper
- java读取.properties文件时的乱码问题