当前位置:网站首页>项目引入jar从私服Nexus 拉去遇到的一个问题
项目引入jar从私服Nexus 拉去遇到的一个问题
2022-07-05 16:27:00 【MyySophia】
背景
项目新增了一个pom,使用外网机器下载包到本地。pom文件如下:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.373 s
[INFO] Finished at: 2022-07-04T13:15:20+08:00
[INFO] Final Memory: 11M/243M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin com.google.cloud.tools:jib-maven-plugin:1.6.0 or one of its dependencies could not be resolved: Failure to find com.google.cloud.tools:jib-maven-plugin:jar:1.6.0 in http://10.50.10.45:8081/repository/maven-public/ was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
为什么有的pom在public 有的在release 仓库?
idea从maven-public拉取,而nexus的public下没有但是release下却有,这是什么原因呢?
http://ip:8081/repository/maven-public/com/lichkin/framework/lichkin-framework-excel/2.1.0.RELEASE/lichkin-framework-excel-2.1.0.RELEASE.pom
http://ip:8081/repository/maven-releases/maven/repo/lichkin/framework/lichkin-framework-excel/2.1.0.RELEASE/lichkin-framework-excel-2.1.0.RELEASE.pom
Nexus安装后默认有三个本地仓库,release、snapshot、3rd party
- Release: 存放稳定版的jar
- Snapshot: 存放快照版本
- 3rd Party: 存放自己上传的第三方jar,比如jdbc驱动
仓库类型又分为三种
- hosted: 本地仓库,包括上面的release、snapshot、3rd party
- proxy: 代理仓库,用代理远程的公共仓库,比如中央仓库、阿里云的仓库等
- group:仓库组,用来分组hosted和proxy,避免项目中引入多个repository
我的setting文件如下:
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>nexus</id>
<name>Public Repositories</name>
<url>http://ipip:8081/repository/maven-public/</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>central</id>
<name>Central Repositories</name>
<url>http://ipip:8081/repository/maven-central/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>release</id>
<name>Release Repositories</name>
<url>http://ipip:8081/repository/maven-releases/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>snapshots</id>
<name>Snapshot Repositories</name>
<url>http://ipip:8081/repository/maven-snapshots/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>plugins</id>
<name>Plugin Repositories</name>
<url>http://ipip:8081/repository/maven-public/</url>
</pluginRepository>
</pluginRepositories>
</profile>搞了一天还是没搞定这个仓库的jar包拉取。
最后决定从本地的仓库加载,需要加这个参数:
-DarchetypeCatalog=internal

问题暂时解决了,但是nexus的坑还没填上。
边栏推荐
- 帮忙看看是什么问题可以吗?[ERROR] Could not execute SQL stateme
- 深潜Kotlin协程(二十一):Flow 生命周期函数
- Summary of methods for finding intersection of ordered linked list sets
- Pspnet | semantic segmentation and scene analysis
- 手机开证券账户安全吗?怎么买股票详细步骤
- Deeply cultivate 5g, and smart core continues to promote 5g applications
- How to set the WiFi password of the router on the computer
- 阈值同态加密在隐私计算中的应用:解读
- Jarvis OJ Flag
- npm安装
猜你喜欢

为季前卡牌游戏 MotoGP Ignition Champions 做好准备!

Starkware: to build ZK "universe"

【组队 PK 赛】本周任务已开启 | 答题挑战,夯实商品详情知识

Basic introduction to the control of the row component displaying its children in the horizontal array (tutorial includes source code)

Pspnet | semantic segmentation and scene analysis

机器学习编译第2讲:张量程序抽象

Games101 notes (III)

DenseNet

Jarvis OJ webshell analysis

Learnopongl notes (II) - Lighting
随机推荐
搜索 正排索引 和 倒排索引 区别
Learnopongl notes (I)
WSL2.0安装
tf. sequence_ Mask function explanation case
【刷題篇】鹅廠文化衫問題
File operation --i/o
Data verification before and after JSON to map -- custom UDF
How does the outer disk futures platform distinguish formal security?
[es6] add if judgment or ternary operator judgment in the template string
C how TCP restricts the access traffic of a single client
[js] 技巧 简化if 判空
【剑指 Offer】61. 扑克牌中的顺子
美国芯片傲不起来了,中国芯片成功在新兴领域夺得第一名
[729. My schedule I]
【刷题篇】有效的数独
ECU简介
手机开证券账户安全吗?怎么买股票详细步骤
Deep dive kotlin synergy (XXI): flow life cycle function
如何将mysql卸载干净
有序链表集合求交集 方法 总结