Closed hohwille closed 6 years ago
Travis is giving me a hard time at the moment:
[ERROR] Non-resolvable import POM: Failure to transfer org.apache.logging.log4j:log4j-bom:pom:2.7 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.logging.log4j:log4j-bom:pom:2.7 from/to central (https://repo.maven.apache.org/maven2): Received fatal alert: protocol_version @ org.springframework.boot:spring-boot-dependencies:1.5.3.RELEASE, /home/travis/.m2/repository/org/springframework/boot/spring-boot-dependencies/1.5.3.RELEASE/spring-boot-dependencies-1.5.3.RELEASE.pom, line 1258, column 16 -> [Help 2]
https://github.com/technomancy/leiningen/issues/2364
So if I understand correct, this build error has noting to do with my change. But why on earth does travis build #623 - most likely precise
is finally broken and we have to have the upgrade to trusty
to make our build work at all again. Sucks!
So the error does not relate to the travis dist. Still I do not see how these POMs:
relates to a network error with
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-bom</artifactId>
<version>${log4j2.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
There is no relation between this two that I can see or trace down and without my change also the same spring-boot-dependencies-1.5.3.RELEASE.pom and log4j-bom-2.7.pom are used. You can verify this in the log of another successful travis build: https://api.travis-ci.org/v3/job/394002740/log.txt
Really strange. I am clueless and still can not get travis debugging to work.
So for the travis build failure first of all this is indeed a TLS issue that can be fixed with the JVM option -Dhttps.protocols=TLSv1.2
specified to maven. We would only need to find a way to specify this in .travis.yml
in a more elegant way (as otherwise the build is then performed one more time additionally what is a waste of time and resources).
Next and also crazy is that the build now fails with this error:
[INFO] [ERROR] Error resolving version for plugin 'org.apache.maven.plugins:maven-compiler-plugin' from the repositories [local (/home/travis/.m2/repository), central (https://repo.maven.apache.org/maven2)]: Plugin not found in any plugin repository -> [Help 1] [INFO] org.apache.maven.plugin.version.PluginVersionResolutionException: Error resolving version for plugin 'org.apache.maven.plugins:maven-compiler-plugin' from the repositories [local (/home/travis/.m2/repository), central (https://repo.maven.apache.org/maven2)]: Plugin not found in any plugin repository
So IMHO travis is not a reliable environment for maven builds at the moment. I might find another workaround for this but we might also need to look for an alternative to travis as otherwise we need 4x extra work to fix travis build on top of the actual PR that we want to provide.
Also note before in the build log:
[INFO] [INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml [INFO] [WARNING] Could not transfer metadata org.apache.maven.plugins:maven-compiler-plugin/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): Received fatal alert: protocol_version
And see in your browser that the URL is working fine: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml
Closing. Hopeless case. Will start again from scratch...
For the record: Traivs seems to support to set JVM options like this:
- _JAVA_OPTIONS=-Dhttps.protocols=TLSv1.2
See also:
https://github.com/paypal/squbs/blob/master/.travis.yml
I found a real fix for #238 so we do not require any workarounds hacking maven batch files in bin folder of maven installation.