【问题标题】:maven .pom and . pom.shal1 files not getting updatedMaven .pom 和 . pom.shal1 文件未更新
【发布时间】:2017-11-05 02:51:17
【问题描述】:

我正在尝试第一次安装 maven,并在尝试执行 maven force 更新以将 jars 放入我的本地存储库时看到以下问题。我可以看到属性文件 jar 和 jar.sha1 但 .pom 和 .pom.sha1 没有得到更新。当我转到特定文件夹时,我看到的是这个文件

maven-clean-plugin-3.0.0.pom.lastUpdated

这发生在我的存储库中的所有文件夹中。这个 .lastUpdated 文件中的内容是

#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
#Sat Nov 04 22:38:58 EDT 2017
https\://artifactory.cen.gov/artifactory/repo/.error=Could not transfer artifact org.apache.maven.plugins\:maven-clean-plugin\:pom\:3.0.0 from/to repo (https\://artifactory.cen.gov/artifactory/repo)\: com.ibm.jsse2.util.h\: PKIX path building failed\: java.security.cert.CertPathBuilderException\: PKIXCertPathBuilderImpl could not build a valid CertPath.; internal cause is\: \n\tjava.security.cert.CertPathValidatorException\: The certificate issued by CN\=CENInternalRootCA, OU\=cen Service, O\=U.S. Government, C\=US is not trusted; internal cause is\: \n\tjava.security.cert.CertPathValidatorException\: Certificate chaining error
@proxy.cen.gov\:8080>@default-repo-https\://artifactory.cen.gov/artifactory/repo/.lastUpdated=1509849538349

我之前有这个证书链接异常,但在添加正确的证书并创建密钥库并将它们添加到 env 变量后摆脱了。 由于这个错误,我无法进行 maven clean 或作为 maven install 运行。 请问有什么建议吗?

【问题讨论】:

  • 您好,有什么建议吗?
  • 您的问题及其标记有点误导。联系特定 Web 资源时遇到证书链接错误 - 问题不是直接连接到 Maven 或 POM,而可能是一种网络问题。
  • 首先您在 IBM Java 上运行...而不是在 Oracle Java 上运行此外问题是基于证书问题定位...首先...请先解决此问题...在我们之前可以走得更远……

标签: maven maven-3 maven-plugin


【解决方案1】:

当您已经解决了证书问题时,您可以使用

强制更新
mvn clean install -U

-U,--update-snapshots 强制检查缺失 发布和更新快照 远程仓库

否则,您可以删除本地存储库。这是强制 Maven 重新下载所有依赖项的一种非常有效的方法,但下一次构建可能需要大量时间,具体取决于依赖项的数量。

存储库默认位于~/.m2/repository。否则,其位置由settings.xml 中的<localRepository> 设置配置。

另见Force maven update

如果您的证书链问题仍然存在,Maven 将无法下载依赖项,您将再次获得相同的 .lastUpdated 文件

【讨论】:

  • 我确实删除了本地存储库并尝试了多次并遇到相同的问题。 Maven 更新效果很好,但是在进行 Maven 清理时,不会上传 .pom 和 .pom.sha1 而是获取 lastUpdated 文件。
猜你喜欢
  • 2013-10-02
  • 1970-01-01
  • 2013-10-06
  • 1970-01-01
  • 2017-04-10
  • 1970-01-01
  • 1970-01-01
  • 2011-10-05
  • 2011-04-12
相关资源
最近更新 更多