oasp / oasp4j

The Open Application Standard Platform for Java
Apache License 2.0
60 stars 303 forks source link

oasp/oasp4j#238: real fix for archetype build problem #651

Closed hohwille closed 6 years ago

hohwille commented 6 years ago

I found a real fix for #238 so we do not require any workarounds hacking maven batch files in bin folder of maven installation.

hohwille commented 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!

hohwille commented 6 years ago

So the error does not relate to the travis dist. Still I do not see how these POMs:

relates to a network error with

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.

hohwille commented 6 years ago

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

hohwille commented 6 years ago

Closing. Hopeless case. Will start again from scratch...

hohwille commented 6 years ago

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