当前位置: 首页 > 知识库问答 >
问题:

Maven无法在同一repo上传输多个工件中的一个

归俊捷
2023-03-14

我试图使用MVN archetype:create-from-project从现有项目创建一个原型,但我得到了

Could not transfer artifact org.apache.maven.archetype:archetype-packaging:pom:3.0.0 
from/to central (https://repo.maven.apache.org/maven2):
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: 
unable to find valid certification path to requested target

我在防火墙后面,所以我跟踪以下内容https://stackoverflow.com/a/25912982/358794并执行:

$ mvn archetype:create-from-project -Djavax.net.ssl.keyStore=trustCARoot.jks
 -Djavax.net.ssl.keyStorePassword=password  
 -Djavax.net.ssl.keyStoreType=JKS
 -Djavax.net.ssl.trustStore=trustCARoot.jks  
 -Djavax.net.ssl.trustStorePassword=password  
 -Djavax.net.ssl.trustStoreType=JKS

我仍然得到相同的PKIX路径构建失败,但只是原型打包

[INFO] Setting default groupId: com.domain.rozycki
[INFO] Setting default artifactId: SkillsApp
[INFO] Setting default version: 0.0.1-SNAPSHOT
[INFO] Setting default package: com.domain.skillsapp
[INFO] Scanning for projects...
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-packaging/3.0.0/archetype-packaging-3.0.0.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin org.apache.maven.archetype:archetype-packaging:3.0.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.m
aven.archetype:archetype-packaging:jar:3.0.0 @
[ERROR] Unknown packaging: maven-archetype @ line 8, column 14
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project com.gdeb.rozycki:SkillsApp-archetype:0.0.1-SNAPSHOT (C:\Users\jrozycki\Development\Archetype\SkillsApp\target\generated-sources\archetype\pom.xml) has 2 errors
[ERROR]     Unresolveable build extension: Plugin org.apache.maven.archetype:archetype-packaging:3.0.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apac
he.maven.archetype:archetype-packaging:jar:3.0.0: Could not transfer artifact org.apache.maven.archetype:archetype-packaging:pom:3.0.0 from/to central (https://repo.maven.apache.org/maven2): sun.secur
ity.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 2]
[ERROR]     Unknown packaging: maven-archetype @ line 8, column 14
[ERROR]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

如果我清除依赖项作为设置信任存储的测试,mv archetype-catalog archetype-catalog_backup并重新运行它确实连接到repo并重新下载archetype-catalog,但仍然会挂断archetype-packaging

Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-catalog/3.0.0/archetype-catalog-3.0.0.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-catalog/3.0.0/archetype-catalog-3.0.0.pom (2 KB at 2.5 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-catalog/3.0.0/archetype-catalog-3.0.0.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-catalog/3.0.0/archetype-catalog-3.0.0.jar (19 KB at 70.1 KB/sec)
[INFO] Setting default groupId: com.domain.rozycki
[INFO] Setting default artifactId: SkillsApp
[INFO] Setting default version: 0.0.1-SNAPSHOT
[INFO] Setting default package: com.domain.skillsapp
[INFO] Scanning for projects...
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-packaging/3.0.0/archetype-packaging-3.0.0.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin org.apache.maven.archetype:archetype-packaging:3.0.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.m
aven.archetype:archetype-packaging:jar:3.0.0 @
[ERROR] Unknown packaging: maven-archetype @ line 8, column 14
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project com.gdeb.rozycki:SkillsApp-archetype:0.0.1-SNAPSHOT (C:\Users\jrozycki\Development\Archetype\SkillsApp\target\generated-sources\archetype\pom.xml) has 2 errors
[ERROR]     Unresolveable build extension: Plugin org.apache.maven.archetype:archetype-packaging:3.0.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apac
he.maven.archetype:archetype-packaging:jar:3.0.0: Could not transfer artifact org.apache.maven.archetype:archetype-packaging:pom:3.0.0 from/to central (https://repo.maven.apache.org/maven2): sun.secur
ity.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 2]
[ERROR]     Unknown packaging: maven-archetype @ line 8, column 14
[ERROR]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

尝试只下载原型包装会产生同样的错误

mvn org.apache.maven.plugins:maven-dependency-plugin:2.1:get \
    -DrepoUrl=https://repo.maven.apache.org/maven2 \
    -Dartifact=org.apache.maven.archetype:archetype-packaging:3.0.0
    -Djavax.net.ssl.keyStore=trustCARoot.jks -Djavax.net.ssl.keyStorePassword=password -Djavax.net.ssl.keyStoreType=JKS  -Djavax.net.ssl.trustStore=trustCARoot.jks  -Djavax.net.ssl.trustStorePassword=password -Djavax.net.ssl.trustStoreType=JKS

关于如何获得构建成功有什么想法吗?我可以右键单击浏览器中的每个文件并保存到本地存储库中,但是当我尝试执行goalMVN archetype:create-from-projectmaven仍然尝试下载archetype-packaging

共有1个答案

和光启
2023-03-14

这里提供的答案是,在my settings.xml中添加新的maven存储库最终解决了在代理后面使用maven和SSL的问题

早些时候,我一直专注于试图生成证书并将其包含在我的信任存储中,但这从未解决问题。

我仍然需要在settings.xml中指定我的代理

 类似资料:
  • 使用Jenkins 1.501和Jenkins Git插件1.1.26 我有3个不同的git回购,每个都有多个项目。 现在我需要在一个Jenkins Slave上将来自3个git Repo的所有项目签出到同一个工作区。我在《源代码管理:多个SCM》中定义了每个git repo。但每次签出一个回购,就会删除先前的回购(及其关联的项目)。

  • 在IntelliJ中启动新项目时,我遇到了一个问题: < li>Maven构建总是成功终止 < li >“重新加载所有Maven项目”导致错误 < li >无法将org . spring framework . boot . spring application导入主类 这是我的pom.xml: 注意:我尝试添加

  • 问题内容: 即时通讯在上传具有相同输入名称的多个文件时遇到麻烦: 在Django一侧 因此所有三个文件都在单个request.FILES [‘file’]对象下。如何处理从此处上传的每个文件? 问题答案: 编辑:我知道这是一个旧答案,但是我刚才遇到了这个答案,并且已经将答案编辑为实际上是正确的。以前建议你可以直接进行迭代。要访问中的所有项目,请使用。使用just 只会返回它为该键找到的最后一个数据

  • html代码 用于遍历文件列表并一次上载一个文件列表的上载逻辑 一次上载一个文件的Servicecall逻辑 2020-09-21 00:38:24.114错误11348---[nio-5200-exec-5]O.a.C.C.C.[.[.[/].[dispatcherServlet]:路径为[]的上下文中servlet[dispatcherServlet]的servlet.Service()引发异

  • 我有一个案例,需要找出不同版本的表的同一字段之间的差异。 例如: 我有一个名为BankAccount的表,其字段如下 编号、余额、日期等。 现在我想要实现的基本上是在这个表上针对两个不同的日期运行一个select,并找出日期1和日期2的balance字段值之间的差异。 更像:。 我知道,我可以使用其中一个作为分离条件来运行两个选择,这样我至少可以得到两个日期之间的公共记录。我的问题是发现差异和使用

  • 问题内容: 我在一个文件中有多个html文件。 结果是我弄乱了html文件。 如何在不删除其余标签的情况下更正此错误? 我正在使用python生成html文件。 如果使用,我会得到一个漂亮的html页面。 如果我第二次使用它,则页面会变形。 我们可以使用iframe纠正此问题吗?有人可以举个例子吗? 问题答案: 一个HTML文档只能有一个标签和一个标签。如果仅将多个HTML文档放在一起,则它将是无