Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails due to certificate problems in Maven package #34

Closed
avapirev opened this issue Jan 19, 2017 · 6 comments
Closed

Build fails due to certificate problems in Maven package #34

avapirev opened this issue Jan 19, 2017 · 6 comments

Comments

@avapirev
Copy link

This is the error screen output.
Best regards.

[INFO] ------------------------------------------------------------------------
[INFO] Building SparkBWA 0.2
[INFO] ------------------------------------------------------------------------
Downloading: https://mvn.128.no/maven2/cz/adamh/utils/native-utils/1.0-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata cz.adamh.utils:native-utils:1.0-SNAPSHOT/maven-metadata.xml from/to 128 (https://mvn.128.no/maven2): hostname in certificate didn't match: <mvn.128.no> != <128.no> OR <128.no>
[WARNING] Failure to transfer cz.adamh.utils:native-utils:1.0-SNAPSHOT/maven-metadata.xml from https://mvn.128.no/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of 128 has elapsed or updates are forced. Original error: Could not transfer metadata cz.adamh.utils:native-utils:1.0-SNAPSHOT/maven-metadata.xml from/to 128 (https://mvn.128.no/maven2): hostname in certificate didn't match: <mvn.128.no> != <128.no> OR <128.no>
Downloading: https://mvn.128.no/maven2/cz/adamh/utils/native-utils/1.0-SNAPSHOT/native-utils-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.596s
[INFO] Finished at: Thu Jan 19 08:13:45 CET 2017
[INFO] Final Memory: 20M/161M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project SparkBWA: Could not resolve dependencies for project com.github.sparkbwa:SparkBWA:jar:0.2: Failed to collect dependencies for [org.apache.spark:spark-core_2.11:jar:2.0.1 (compile), cz.adamh.utils:native-utils:jar:1.0-SNAPSHOT (compile)]: Failed to read artifact descriptor for cz.adamh.utils:native-utils:jar:1.0-SNAPSHOT: Could not transfer artifact cz.adamh.utils:native-utils:pom:1.0-SNAPSHOT from/to 128 (https://mvn.128.no/maven2): hostname in certificate didn't match: <mvn.128.no> != <128.no> OR <128.no> -> [Help 1]

@jmabuin
Copy link
Contributor

jmabuin commented Jan 27, 2017

Try to update your maven version. This same thing happened to me and it worked after update maven.
For me it worked with this version:
http://artfiles.org/apache.org/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz

@avapirev
Copy link
Author

Yes, updating Maven was the first thing I did. But I also had to update JDK.

@jmabuin
Copy link
Contributor

jmabuin commented Jan 27, 2017

And it worked?

@avapirev
Copy link
Author

Yup. For some reason I had to update both. Maven 3.3.9 / Java 1.8.0_121

@jmabuin
Copy link
Contributor

jmabuin commented Jan 27, 2017

Great! Thanks!

@Shenglai
Copy link

Shenglai commented Nov 27, 2017

Hi, I'm having the same issue.

mvn --version
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_141, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-71-generic", arch: "amd64", family: "unix"

The error msg:

mvn package                                                                                      
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building SparkBWA 0.2
[INFO] ------------------------------------------------------------------------
Downloading: https://mvn.128.no/maven2/cz/adamh/utils/native-utils/1.0-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata cz.adamh.utils:native-utils:1.0-SNAPSHOT/maven-metadata.xml from/to 128 (https://mvn.128.no/maven2): Access denied to: https://mvn.128.no/m$
ven2/cz/adamh/utils/native-utils/1.0-SNAPSHOT/maven-metadata.xml , ReasonPhrase:Forbidden.
[WARNING] Failure to transfer cz.adamh.utils:native-utils:1.0-SNAPSHOT/maven-metadata.xml from https://mvn.128.no/maven2 was cached in the local repository, resolution will not $
e reattempted until the update interval of 128 has elapsed or updates are forced. Original error: Could not transfer metadata cz.adamh.utils:native-utils:1.0-SNAPSHOT/maven-meta$
ata.xml from/to 128 (https://mvn.128.no/maven2): Access denied to: https://mvn.128.no/maven2/cz/adamh/utils/native-utils/1.0-SNAPSHOT/maven-metadata.xml , ReasonPhrase:Forbidden$
Downloading: https://mvn.128.no/maven2/cz/adamh/utils/native-utils/1.0-SNAPSHOT/native-utils-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.298 s
[INFO] Finished at: 2017-11-27T18:17:05+00:00
[INFO] Final Memory: 32M/1963M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project SparkBWA: Could not resolve dependencies for project com.github.sparkbwa:SparkBWA:jar:0.2: Failed to collect dependencies at cz.adamh.ut
ils:native-utils:jar:1.0-SNAPSHOT: Failed to read artifact descriptor for cz.adamh.utils:native-utils:jar:1.0-SNAPSHOT: Could not transfer artifact cz.adamh.utils:native-utils:po
m:1.0-SNAPSHOT from/to 128 (https://mvn.128.no/maven2): Access denied to: https://mvn.128.no/maven2/cz/adamh/utils/native-utils/1.0-SNAPSHOT/native-utils-1.0-SNAPSHOT.pom , Reaso
nPhrase:Forbidden. -> [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/DependencyResolutionException

Please let me know if full errors from -X are needed. Thank you!

Edit:
I also tried using java 1.8_121 later:

mvn -version
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_121, vendor: Oracle Corporation
Java home: /usr/lib/jvm/jre1.8.0_121
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-71-generic", arch: "amd64", family: "unix"

However, it's getting the same errors:

mvn package                                                                                      [14/1905]
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building SparkBWA 0.2
[INFO] ------------------------------------------------------------------------
Downloading: https://mvn.128.no/maven2/cz/adamh/utils/native-utils/1.0-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata cz.adamh.utils:native-utils:1.0-SNAPSHOT/maven-metadata.xml from/to 128 (https://mvn.128.no/maven2): Access denied to: https://mvn.128.no/m$
ven2/cz/adamh/utils/native-utils/1.0-SNAPSHOT/maven-metadata.xml , ReasonPhrase:Forbidden.
[WARNING] Failure to transfer cz.adamh.utils:native-utils:1.0-SNAPSHOT/maven-metadata.xml from https://mvn.128.no/maven2 was cached in the local repository, resolution will not $
e reattempted until the update interval of 128 has elapsed or updates are forced. Original error: Could not transfer metadata cz.adamh.utils:native-utils:1.0-SNAPSHOT/maven-meta$
ata.xml from/to 128 (https://mvn.128.no/maven2): Access denied to: https://mvn.128.no/maven2/cz/adamh/utils/native-utils/1.0-SNAPSHOT/maven-metadata.xml , ReasonPhrase:Forbidden.
Downloading: https://mvn.128.no/maven2/cz/adamh/utils/native-utils/1.0-SNAPSHOT/native-utils-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.048 s
[INFO] Finished at: 2017-11-27T19:06:40+00:00
[INFO] Final Memory: 26M/1562M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project SparkBWA: Could not resolve dependencies for project com.github.sparkbwa:SparkBWA:jar:0.2: Failed to collect dependencies at cz.adamh.ut
ils:native-utils:jar:1.0-SNAPSHOT: Failed to read artifact descriptor for cz.adamh.utils:native-utils:jar:1.0-SNAPSHOT: Could not transfer artifact cz.adamh.utils:native-utils:po
m:1.0-SNAPSHOT from/to 128 (https://mvn.128.no/maven2): Access denied to: https://mvn.128.no/maven2/cz/adamh/utils/native-utils/1.0-SNAPSHOT/native-utils-1.0-SNAPSHOT.pom , Reaso
nPhrase:Forbidden. -> [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/DependencyResolutionException

Edit2:

My working environment requires proxies. I think it's related. I will try if it works after whitelist https://mvn.128.no/maven2

Edit3:

Yeah, it's because of the proxy. Problem solved. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants