当前位置:网站首页>项目引入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的坑还没填上。
边栏推荐
- Sentinel-流量防卫兵
- JSON转MAP前后数据校验 -- 自定义UDF
- [deep learning] [original] let yolov6-0.1.0 support the txt reading dataset mode of yolov5
- 中国广电正式推出5G服务,中国移动赶紧推出免费服务挽留用户
- Get ready for the pre-season card game MotoGP ignition champions!
- 挖财股票开户安全吗?怎么开股票账户是安全?
- Yarn common commands
- 时间戳strtotime前一天或后一天的日期
- Enter a command with the keyboard
- Benji Bananas 会员通行证持有人第二季奖励活动更新一览
猜你喜欢

Detailed explanation of use scenarios and functions of polar coordinate sector diagram

浏览器渲染原理以及重排与重绘

Iphone14 with pill screen may trigger a rush for Chinese consumers
![[brush title] goose factory shirt problem](/img/c8/44496c767a778101cf3982bd911933.png)
[brush title] goose factory shirt problem

Learnopongl notes (II) - Lighting

Android privacy sandbox developer preview 3: privacy, security and personalized experience

Win11 prompt: what if the software cannot be downloaded safely? Win11 cannot download software safely

【剑指 Offer】63. 股票的最大利润

深潜Kotlin协程(二十一):Flow 生命周期函数

Desci: is decentralized science the new trend of Web3.0?
随机推荐
Fleet tutorial 09 basic introduction to navigationrail (tutorial includes source code)
Yarn common commands
怎样在电脑上设置路由器的WiFi密码
Win11 prompt: what if the software cannot be downloaded safely? Win11 cannot download software safely
国内首家 EMQ 加入亚马逊云科技「初创加速-全球合作伙伴网络计划」
调查显示传统数据安全工具面对勒索软件攻击的失败率高达 60%
[深度学习][原创]让yolov6-0.1.0支持yolov5的txt读取数据集模式
[first lecture on robot coordinate system]
Games101 notes (I)
American chips are no longer proud, and Chinese chips have successfully won the first place in emerging fields
How was the middle table destroyed?
[729. My schedule I]
Scratch colorful candied haws Electronic Society graphical programming scratch grade examination level 3 true questions and answers analysis June 2022
美国芯片傲不起来了,中国芯片成功在新兴领域夺得第一名
The first EMQ in China joined Amazon cloud technology's "startup acceleration - global partner network program"
Jarvis OJ 简单网管协议
【 brosser le titre 】 chemise culturelle de l'usine d'oies
"21 days proficient in typescript-3" - install and build a typescript development environment md
干货!半监督预训练对话模型 SPACE
The survey shows that the failure rate of traditional data security tools in the face of blackmail software attacks is as high as 60%