我的项目是基于模块的,下面是结构
我提到了以下堆栈溢出链接Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.,这是我的发现
错误消息:
[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项目运行正常时,我才会收到此错误