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

Fix Travis CI #1606

Closed
Marcono1234 opened this issue Nov 5, 2019 · 2 comments · Fixed by #1607

Comments

@Marcono1234
Copy link
Contributor

@Marcono1234 Marcono1234 commented Nov 5, 2019

Description

Travis CI fails for all builds. The relevant Travis log part is probably:

openjdk version "9.0.4"
OpenJDK Runtime Environment (build 9.0.4+11)
OpenJDK 64-Bit Server VM (build 9.0.4+11, mixed mode)
$ javac -J-Xmx32m -version
javac 9.0.4
3.54s$ mvn -f gson install -DskipTests=true
[INFO] Scanning for projects...
Downloading from google-maven-central: https://maven-central.storage-download.googleapis.com/repos/central/data/org/sonatype/oss/oss-parent/7/oss-parent-7.pom
Downloading from sonatype: https://oss.sonatype.org/content/repositories/releases/org/sonatype/oss/oss-parent/7/oss-parent-7.pom
Downloading from sonatype-apache: https://repository.apache.org/content/repositories/releases/org/sonatype/oss/oss-parent/7/oss-parent-7.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.google.code.gson:gson-parent:2.8.6-SNAPSHOT: Could not transfer artifact org.sonatype.oss:oss-parent:pom:7 from/to google-maven-central (https://maven-central.storage-download.googleapis.com/repos/central/data/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target and 'parent.relativePath' points at wrong local POM @ com.google.code.gson:gson-parent:2.8.6-SNAPSHOT, /home/travis/build/google/gson/pom.xml, line 6, column 11

It appears it tries all configured repositories and then fails:

  1. maven-central.storage-download.googleapis.com
  2. oss.sonatype.org (this just redirects to central!)
  3. repository.apache.org

It looks like Maven mixes the exception messages, but the actual problem is:

sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

If we now compare the last successful build with the first known failing (there might have been earlier ones through pull requests, but Travis does not show them), we will see:

Successful Failed
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
openjdk version "9.0.4"
OpenJDK Runtime Environment (build 9.0.4+11)

And indeed there is JDK-8189357 which describes that the cacerts file for OpenJDK is empty.
To fix this a different truststore has to be specified, the certificates have to be imported, or you could switch to OpenJDK > 9 (see JEP 319), e.g. 11 which runs the build successfully as well and is also LTS.

@inder123

This comment has been minimized.

Copy link
Collaborator

@inder123 inder123 commented Nov 5, 2019

Thanks. Can you send a PR that fixes the issue?

@Marcono1234

This comment has been minimized.

Copy link
Contributor Author

@Marcono1234 Marcono1234 commented Nov 5, 2019

Done, see #1607, that seems to fix the problem

inder123 added a commit that referenced this issue Nov 5, 2019
Fixes #1606 (?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.