如何nexus 批量上传jar包包至Maven私服

在 SegmentFault,学习技能、解决问题
每个月,我们帮助 1000 万的开发者解决各种各样的技术问题。并助力他们在技术能力、职业生涯、影响力上获得提升。
问题对人有帮助,内容完整,我也想知道答案
问题没有实际价值,缺少关键内容,没有改进余地
No plugin found for prefix 'deploy' in the current project and in the plugin groups [org.sonarsource.scanner.maven, org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/wang/Documents/branch/test/m2), nexus( -& [Help 1]org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'deploy' in the current project and in the plugin groups [org.sonarsource.scanner.maven, org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/wang/Documents/branch/test/m2), nexus (
在上传的过程当中,会在/Users/wang/Documents/branch/test/m2路径下去生成/Users/wang/Documents/branch/wxq/m2/org/apache/maven/plugins/maven-deploy-plugin/2.7 这又是为什么?而且2.7里面是lastUpdated文件,确实私服上面中央仓库当中没有2.7版本的plugin,可是我是在哪里指定了呢?
同步到新浪微博
分享到微博?
关闭理由:
删除理由:
忽略理由:
推广(招聘、广告、SEO 等)方面的内容
与已有问题重复(请编辑该提问指向已有相同问题)
答非所问,不符合答题要求
宜作评论而非答案
带有人身攻击、辱骂、仇恨等违反条款的内容
无法获得确切结果的问题
非开发直接相关的问题
非技术提问的讨论型问题
其他原因(请补充说明)
我要该,理由是:
在 SegmentFault,学习技能、解决问题
每个月,我们帮助 1000 万的开发者解决各种各样的技术问题。并助力他们在技术能力、职业生涯、影响力上获得提升。您还没有登录,快捷通道只有在登录后才能使用。 还没有帐号? 赶紧
阿里云maven中央仓库、顺便奉上JAR包小工具
在线时间948小时
&maven仓库用过的人都知道,国内有多么的悲催。&&&还好有比较好用的镜像可以使用,尽快记录下来,速度提升100倍。&&&当然如果有条件你也可以自建私服。&&&&&http://maven.aliyun.com/nexus/#view-public~browsestorage&&&在maven的settings.xml 文件里配置mirrors的子节点,添加如下mirror&&mirror&&&&&&&&&&id&nexus-aliyun&/id&&&&&&&&&&mirrorOf&*&/mirrorOf&&&&&&&&&&name&Nexus aliyun&/name&&&&&&&&&&url&http://maven.aliyun.com/nexus/content/groups/public&/url&&&&&&/mirror&&&最后分享一个jar包下载的小工具,如果你的项目是maven项目,可以略过,如果不是,下载JAR很方便的。&&&download.bat&call mvn -f pom.xml dependency:copy-dependencies@pausepom.xml&&?xml version=&1.0&?&&project xmlns=&http://maven.apache.org/POM/4.0.0& xmlns:xsi=&http://www.w3.org/2001/XMLSchema-instance& xsi:schemaLocation=&http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&&&&&&&modelVersion&4.0.0&/modelVersion&&&&&&groupId&temp.download&/groupId&&&&&&artifactId&temp-download&/artifactId&&&&&&version&1.0-SNAPSHOT&/version& &&&&&dependencies&&!-- 需要下载什么jar包 添加相应依赖 其余部分无需在意--&&!-- https://mvnrepository.com/artifact/org.springframework/spring-test --&&!-- https://mvnrepository.com/artifact/junit/junit --&&!-- https://mvnrepository.com/artifact/org.springframework/spring-websocket --&&!-- https://mvnrepository.com/artifact/javax.mail/mail --&&!-- https://mvnrepository.com/artifact/org.springframework/spring-jms --&&!-- struts2依赖包 --&&&&&&&&dependency&&&&&&&&&&&&groupId&org.apache.struts&/groupId&&&&&&&&&&&&artifactId&struts2-core&/artifactId&&&&&&&&&&&&version&2.5.2&/version&&&&&&&&/dependency& &&&&&&&/dependencies&&/project&&&然后 双击 就可以了。&&&&
在线时间521小时
感谢分享!
在线时间1小时
回 楼主小柒2012的帖子 这个maven库有小缺陷
不知是故意还是无意:发现 里面的 sha1或者md5 的校验文件,都多了一个 换行符号 0D 0A ,&这个会导致部分其他nexus镜像时会出现问题. 版主问问管理员,这个是故意的,还是因为无意的?是否应该纠正一下这些文件,删除第头2个字符.&&差异如下:&repo1.maven.org/maven2/commons-lang/commons-lang/2.6/commons-lang-2.6.jar.sha1&&maven.aliyun.com/nexus/content/groups/public/commons-lang/commons-lang/2.6/commons-lang-2.6.jar.sha1[ 此帖被zhengbin78在 16:47重新编辑 ]
本帖最近评分记录:
共 <span class="s2" id="pingNum_ 条评分
这个问题,可能也不在管理员的范畴内,不过可以反映一下。
在线时间948小时
这个问题,可能也不在管理员的范畴内,不过可以反映一下。
在线时间0小时
Re阿里云maven中央仓库、顺便奉上JAR包小工具
谢谢分享,还真没注意/xiaozhang10.ebdoor.com/&/q13963.com.pe168.com&/q13964.com.pe168.com/&/q1391.com.pe168.com/&/q13962.cn.vlongbiz.com&/q13963.cn.vlongbiz.com&q13961.emushroom.net/&/kaijinan.58food.com/
在线时间1小时
回 3楼小柒2012的帖子我是想找到那个maven服务器的管理员
让maven服务器管理员修正一下这个错误,删除错误的文件夹文件,然后再重新同步镜像.&错误这个事情,还是比较害人的,有坑.&外部程序员没法找到 这个 maven镜像库管理员.[ 此帖被zhengbin78在 15:46重新编辑 ]
在线时间0小时
Re阿里云maven中央仓库、顺便奉上JAR包小工具
感谢阿里云Maven镜像仓库,现在项目构建便捷得多&&现在有个问题,一个cas项目,因为使用WAR overlay strategy,所以依赖jasig的war文件,但是该war无法下载,但是其他文件都没有问题。&文件地址:http:// maven.aliyun.com/nexus/content/groups/public/org/jasig/cas/cas-server-webapp/4.2.7/cas-server-webapp-4.2.7.war&提示403 Forbidden&我尝试使用本机、阿里云服务器和其他服务器都无法下载,猜测可能对文件扩展名进行下载限制了,这部分能不能处理一下?&&以上,感谢您的帮助&
在线时间948小时
回 6楼(隐藏内容) 的帖子
这个 我也不是 很清楚
尝试了一下的确403 禁止访问,可能阿里的maven做了一部分限制。可以尝试去原来maven库下载了。&[ 此帖被小柒-04-03 21:50重新编辑 ]
在线时间2小时
Re阿里云maven中央仓库、顺便奉上JAR包小工具
阿里云 果然财大急促
在线时间0小时
&引用板凳zhengbin78 :&&(抱歉,你的帖子带连接,级别不够,直接点引用发不了贴)&&我前几天也发现了这个问题,对我的私服有影响。&我的私服代理了aliyun maven仓库,maven中央仓库,下载顺序为ali,central, 设置校验的情况下,只会走central,不校验的话会优先走ali,这说明ali的仓库校验没有通过,对比了ali和central的sha1和md5文件,ali的文件内校验值没问题,就是前面多了空行, 另外,不知道ali的maven仓库有没有发布离线的index?[ 此帖被阿斯蒂芬999在 14:23重新编辑 ]
在线时间124小时
&发表于: 01-25
您的帖子很精彩!希望很快能再分享您的下一帖!
在线时间124小时
&发表于: 01-25
您的帖子很精彩!希望很快能再分享您的下一帖!
访问内容超出本站范围,不能确定是否安全
限100 字节
如果您在写长篇帖子又不马上发表,建议存为草稿
您目前还是游客,请
验证问题: ECS是阿里云提供的什么服务? 正确答案:云服务器
&回复后跳转到最后一页发布jar包至maven本地库及私服
<span type="1" blog_id="1843834" userid='
分享到朋友圈
好的文章,和好友一起分享> 博客详情
摘要: 通过网页和maven两种方式,上传本地的jar到nexus私服,以及引用jar时,自动引用依赖
1通过网页上传
这种方法只是上传了jar包。通过maven引用当前jar,不能取得jar的依赖
from pom的方式,选择pom文件,以及jar。通过maven引入jar时,会自动加载jar的依赖
2通过maven的方式depoly
在maven的conf/setting.xml 配置nexus私服的管理账号
在servers标签下添加server
&&&&server&
&&&&&&&id&nexus-snapshots&/id&
&&&&&&&username&repouser&/username&
&&&&&&&password&repopwd&/password&
&&&&&/server&
id可自己定义一个名称 &以及私服的管理管的账号密码
在mirrors和profiles下配置nexus私服
&&&&&mirror&
&&&&&&&!--This&sends&everything&else&to&/public&--&
&&&&&&&id&nexus&/id&
&&&&&&&mirrorOf&*&/mirrorOf&
&&&&&&&url&http://192.168.10.8:18080/nexus/content/repositories/releases/&/url&
&&&&&/mirror&
&&&/mirrors&
&&&profiles&
&&&&&profile&
&&&&&&&id&nexus&/id&
&&&&&&&!--Enable&snapshots&for&the&built&in&central&repo&to&direct&--&
&&&&&&&!--all&requests&to&nexus&via&the&mirror&--&
&&&&&&&repositories&&
&&&&&&&&&repository&&
&&&&&&&&&&&&&id&nexus&/id&&
&&&&&&&&&&&&&name&local&private&nexus&/name&&
&&&&&&&&&&&&&url&http://192.168.10.8:18080/nexus/content/groups/public&/url&&
&&&&&&&&&&&&&releases&&enabled&true&/enabled&&updatePolicy&always&/updatePolicy&
&&&&&&&&&&&&&checksumPolicy&warn&/checksumPolicy&&/releases&&
&&&&&&&&&&&&&snapshots&&enabled&false&/enabled&&/snapshots&&
&&&&&&&&&/repository&&&&&&&&&
&&&&&&&/repositories&&
&&&&&&&pluginRepositories&&
&&&&&&&&&pluginRepository&&
&&&&&&&&&&&&&id&nexus&/id&&
&&&&&&&&&&&&&name&local&private&nexus&/name&&
&&&&&&&&&&&&&url&http://192.168.10.8:18080/nexus/content/groups/public&/url&&
&&&&&&&&&&&&&releases&&enabled&true&/enabled&&updatePolicy&always&/updatePolicy&
&&&&&&&&&&&&&checksumPolicy&warn&/checksumPolicy&&/releases&&
&&&&&&&&&&&&&snapshots&&enabled&false&/enabled&&/snapshots&&
&&&&&&&&&/pluginRepository&&&&&&&&&
&&&&&&&&/pluginRepositories&&
&&&&&/profile&
&&&/profiles&
&&&activeProfiles&
&&&&&!--make&the&profile&active&all&the&time&--&
&&&&&activeProfile&nexus&/activeProfile&
&&&/activeProfiles&
在项目的pom.xml中配置
&&distributionManagement&
&&&&&&&&&repository&
&&&&&&&&&&&&&id&nexus-releases&/id&
&&&&&&&&&&&&&name&Nexus&Release&Repository&/name&
&&&&&&&&&&&&&url&http://192.168.10.8:18080/nexus/content/repositories/releases/&/url&
&&&&&&&&&/repository&
&&&&&&&&&snapshotRepository&
&&&&&&&&&&&&&id&nexus-snapshots&/id&
&&&&&&&&&&&&&name&Nexus&Snapshot&Repository&/name&
&&&&&&&&&&&&&url&http://192.168.10.8:18080/nexus/content/repositories/snapshots/&/url&
&&&&&&&&&/snapshotRepository&
&&&&&/distributionManagement&
id与settings.xml中的server的id对应
当项目package后
mvn&deploy
就可以将jar上传到nexus私服
那可能当时我这边的不太一样吧 反正两种方式 试着来~
可以 配置的那个 应该是可以在开发工具中识别出来节点 切换节点用的
支付宝支付
微信扫码支付
打赏金额: ¥
已支付成功
打赏金额: ¥

我要回帖

更多关于 上传jar包到nexus 的文章

 

随机推荐