maven Nexus的一些注意事项
来源:互联网 发布:sqlserver 维护计划 编辑:程序博客网 时间:2024/06/16 16:29
一、发现配置后,下载构件抛异常。
0-10-3 下午05时09分43秒: Build error for /com.newyulong.iptv.domain.entity/pom.xml; org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.1 or one of its dependencies could not be resolved: Missing:
----------
1) org.apache.maven.plugins:maven-resources-plugin:maven-plugin:2.4.1
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.apache.maven.plugins -DartifactId=maven-resources-plugin -Dversion=2.4.1 -Dpackaging=maven-plugin -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.apache.maven.plugins -DartifactId=maven-resources-plugin -Dversion=2.4.1 -Dpackaging=maven-plugin -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
----------
1 required artifact is missing.
for artifact:
org.apache.maven.plugins:maven-resources-plugin:maven-plugin:2.4.1
from the specified remote repositories:
Nexus (http://localhost:8181/nexus/content/groups/public , releases=true, snapshots=false)
二、主要原因是配置nexus里面的 Public Repositories 顺序和条件出错,导致不能下载构件。
这个是正确的配置顺序,左边的是正在使用的定义好的仓库组,一边是可选的。下载构件的顺序是先在本地releases找有没有,再snapshots,再3rd party,最后是本地机子都没有构件就到远程(外网)提供的网站下载构件。
好多公司处于安全考虑,用代理上网,而nexus 经常需要往maven repository中心下载东西,所以需要给nexus设置代理。 开始没找到地方,后来发现可以从nexus后台管理器界面上直接设置,地方很隐蔽:
登陆后进入管理页面,从左边菜单栏选择Server 打开右边tab页,发现还是找不到,别着急,仔细找会发现有行: default http proxy settings 前面有个checkbox 未勾选, 速度勾选之,马上出现了您熟悉的 proxy host,proxy port , username , passowrd. okay 代理设置完成,现在nexus能通过互联网从maven repository中心下载东西了
- maven Nexus的一些注意事项
- nexus,maven使用中遇到的一些问题
- nexus本地私服对应的maven一些配置问题
- nexus的maven搭建
- nexus的管理maven仓库
- maven学习---nexus的安装
- maven学习(nexus的安装)
- Maven私服Nexus的构建
- 配置maven 的nexus参数
- Nexus搭建的maven 私库
- maven nexus配置文件的作用
- maven与nexus的使用
- Nexus私服下maven的设置
- Maven私服Nexus的搭建
- Nexus私人仓库和Maven网络上的一些错误的解决办法,进行修正
- maven的私服搭建 Maven Nexus
- maven项目配置时私服nexus以及仓库repository的一些情况
- maven Nexus
- Android回顾之网络接口
- NYOJ-54-小明的存钱计划
- 关于前台开源JS控件管理问题求指导
- 手把手教您开发JAVA微信SDK-发送消息
- Android* 操作系统上的应用程序远程调试
- maven Nexus的一些注意事项
- OpenCV学习笔记(11)-K均值
- Linux下FTP端口修改配置及日常问题解决
- Struts2拦截器 实现未登录拦截和权限控制
- asp gb2312 jquery ajax中文乱码解决
- 图像传感器之CMOS(2)
- sitemesh应用Decorator模式
- 强制垃圾回收
- 黑马程序员---Java基础总结--多线程