简体   繁体   中英

Appium: Issue with maven while launching java test cases

I have test cases (written in Java) to be run on device. The appium server is running. Now, as per https://saucelabs.com/resources/mobile-test-automation-in-java-with-appium I ran the test case via command mvn -Dtest=com.saucelabs.appium.SimpleTest test But, then I got the following:

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building java-client 2.1.0
[INFO] ------------------------------------------------------------------------
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.669 s
[INFO] Finished at: 2014-11-25T17:16:59+05:30
[INFO] Final Memory: 4M/14M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6: Could not transfer artifact org.apache.maven.plugins:maven-resources-
plugin:pom:2.6 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 -> [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

I don't know what I might be missing.

The problem with the network restrictions (port, firewall etc.) on my system. I tried on my friend's system and it worked.

I dont completely agree with this. sun.security.provider.certpath.SunCertPathBuilderException suggests that you are it is not able to build the chain using the trust store certificate ( in java) . So this could happen for the following reasons: https://repo.maven.apache.org/maven2 certificate may not be singed by a valid CA or you must have played with your truststore file. (unlikey) or your proxy is blocking for OSCP response ?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM