无法使用Java 1.7执行目标org.apache.maven.plugins:maven-surefire-plugin:2.12:test(默认测试)

时间:2020-01-16 17:06:11

标签: maven-3 maven-plugin maven-surefire-plugin

我的项目是基于模块的,下面是结构

  • 父项POM.xml
    • module1 POM.xml
    • module2 POM.xml
    • module3 POM.xml
    • module4 POM.xml

我提到了以下堆栈溢出链接Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.,这是我的发现

  • 我的项目中没有maven-surefire-plugin,在pom.xml(父级和所有模块)中添加了maven-surefire-plugin
  • 尝试仅在父pom.xml中添加
  • 使用的最新版本-3.0.0M3

错误消息:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M3:test (default-test) on project provider-aggregate-service-provider-common: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M3:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M3 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-surefire-plugin:jar:3.0.0-M3 -> org.apache.maven.surefire:maven-surefire-common:jar:3.0.0-M3: Failed to read artifact descriptor for org.apache.maven.surefire:maven-surefire-common:jar:3.0.0-M3: Could not transfer artifact org.apache.maven.surefire:maven-surefire-common:pom:3.0.0-M3 from/to default (https://my/artifactory/remote-repos/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [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

仅当我使用Java 1.7运行项目并且Java 1.8项目运行正常时,我才会收到此错误

0 个答案:

没有答案
相关问题