Conversation
Firstly, in time honored tradition - the maven enforcer plugin crashes with a null pointer exception, compatibility hasn't been maintained by the Apache team in their latest product iteration. As far as I can see, the sole purpose of this plugin is to enforce the use of Maven 3.0 during builds - Maven 3.0 is obsolete btw. ⚛︎□▷ mvn compile [INFO] Scanning for projects... [WARNING] The project com.basho.riak:riak-client:jar:2.1.2-SNAPSHOT uses prerequisites which is only intended for maven-plugin projects but not for non maven-plugin projects. For such purposes you should use the maven-enforcer-plugin. See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Riak Client for Java 2.1.2-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-property) @ riak-client --- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.751 s [INFO] Finished at: 2018-02-26T14:16:28Z [INFO] Final Memory: 9M/32M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.4.1:enforce (enforce-property) on project riak-client: Execution enforce-property of goal org.apache.maven.plugins:maven-enforcer-plugin:1.4.1:enforce failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-enforcer-plugin:1.4.1:enforce: java.lang.ExceptionInInitializerError: null [ERROR] ----------------------------------------------------- [ERROR] realm = plugin>org.apache.maven.plugins:maven-enforcer-plugin:1.4.1 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy [ERROR] urls[0] = file:/Users/bryanhunt/.m2/repository/org/apache/maven/plugins/maven-enforcer-plugin/1.4.1/maven-enforcer-plugin-1.4.1.jar [ERROR] urls[1] = file:/Users/bryanhunt/.m2/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar [ERROR] urls[2] = file:/Users/bryanhunt/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.jar [ERROR] urls[3] = file:/Users/bryanhunt/.m2/repository/org/slf4j/slf4j-jdk14/1.5.6/slf4j-jdk14-1.5.6.jar [ERROR] urls[4] = file:/Users/bryanhunt/.m2/repository/org/slf4j/jcl-over-slf4j/1.5.6/jcl-over-slf4j-1.5.6.jar [ERROR] urls[5] = file:/Users/bryanhunt/.m2/repository/org/apache/maven/reporting/maven-reporting-api/2.2.1/maven-reporting-api-2.2.1.jar [ERROR] urls[6] = file:/Users/bryanhunt/.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.1/doxia-sink-api-1.1.jar [ERROR] urls[7] = file:/Users/bryanhunt/.m2/repository/org/apache/maven/doxia/doxia-logging-api/1.1/doxia-logging-api-1.1.jar [ERROR] urls[8] = file:/Users/bryanhunt/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar [ERROR] urls[9] = file:/Users/bryanhunt/.m2/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar [ERROR] urls[10] = file:/Users/bryanhunt/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar [ERROR] urls[11] = file:/Users/bryanhunt/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar [ERROR] urls[12] = file:/Users/bryanhunt/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar [ERROR] urls[13] = file:/Users/bryanhunt/.m2/repository/commons-lang/commons-lang/2.3/commons-lang-2.3.jar [ERROR] urls[14] = file:/Users/bryanhunt/.m2/repository/org/apache/maven/enforcer/enforcer-api/1.4.1/enforcer-api-1.4.1.jar [ERROR] urls[15] = file:/Users/bryanhunt/.m2/repository/org/apache/maven/enforcer/enforcer-rules/1.4.1/enforcer-rules-1.4.1.jar [ERROR] urls[16] = file:/Users/bryanhunt/.m2/repository/org/apache/maven/shared/maven-common-artifact-filters/1.4/maven-common-artifact-filters-1.4.jar [ERROR] urls[17] = file:/Users/bryanhunt/.m2/repository/org/beanshell/bsh/2.0b4/bsh-2.0b4.jar [ERROR] urls[18] = file:/Users/bryanhunt/.m2/repository/org/apache/maven/shared/maven-dependency-tree/2.2/maven-dependency-tree-2.2.jar [ERROR] urls[19] = file:/Users/bryanhunt/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar [ERROR] urls[20] = file:/Users/bryanhunt/.m2/repository/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar [ERROR] urls[21] = file:/Users/bryanhunt/.m2/repository/org/codehaus/plexus/plexus-i18n/1.0-beta-6/plexus-i18n-1.0-beta-6.jar [ERROR] urls[22] = file:/Users/bryanhunt/.m2/repository/org/apache/maven/plugin-testing/maven-plugin-testing-harness/1.3/maven-plugin-testing-harness-1.3.jar [ERROR] urls[23] = file:/Users/bryanhunt/.m2/repository/org/codehaus/plexus/plexus-archiver/2.2/plexus-archiver-2.2.jar [ERROR] urls[24] = file:/Users/bryanhunt/.m2/repository/org/codehaus/plexus/plexus-io/2.0.4/plexus-io-2.0.4.jar [ERROR] urls[25] = file:/Users/bryanhunt/.m2/repository/junit/junit/4.11/junit-4.11.jar [ERROR] urls[26] = file:/Users/bryanhunt/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar [ERROR] Number of foreign imports: 1 [ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]] [ERROR] [ERROR] ----------------------------------------------------- [ERROR] : begin 0, end 3, length 1 [ERROR] -> [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/PluginContainerException
Warnings as errors - warning wrt conversion/use of Long in riak/client/core/query/timeseries/DescribeQueryResultParser.java breaks the build - it's deprecated as of Java 9 (installed by default on OSX). IMHO - at this point in product life-cycle better to generate a warning and have folk build the project than fail on something that will be a (potential) issue come Java 10 (and it's debatable whether there's any point in keeping the Riak TS code anyway).
DatatypeConverter is java.xml - can't rely on it being present - I don't know why apache commons codec wasn't used in the first place - every hack has it's price - in this case, it didn't build.
there's a reason why it's called 'internal' you can't depend on it existing in future versions - like now for example :-D
hard to see how this ever worked - it'll work now though.
mockito won't tolerate mocking, then not using the mock anymore - it throws org.mockito.exceptions.misusing.UnnecessaryStubbingException - I've stubbed them out rather than delete in case it's necessary to reason about intent at some point in the future.
Started off with fixing bad call to verifyStatic (API has changed) then having spent about an hour figuring out what was wrong - UnfinishedVerificationException - it was never being hit anyway.
|
So for info, the Travis failure is on 2.0.8 : 2.2.0 succeeds - wondering if it's worth investigating the failure on 2.0.8 or just to target the Java 9 support for 2.2 + ? |
|
Will this PR impact JDK8 support? I think targeting 2.2.0 makes sense to me as the team is actively working on a 2.2.5 release (then move on to 3.0.0). |
|
@jplock JDK8 will still be supported - maven is configured to generate java 8 bytecode . Variable set here : And configuration here : I've also added a couple of JDK to the travis test matrix (previously it was just Oracle 8) - I specifically added OpenJDK 8 as it's threading model is compliant but interleaving is different and can expose some subtle implementation bugs. |
|
OK - build is failing on Java 9 - not because of my changes - but because Yokozuna (Riak running Java as a sub-process) starts it's Solr instance with the following args : Here's the console output : So the problem is not that the riak-java-client won't run on Java 9 - but that the default arguments used by Riak to start Yokozuna (Search) are incompatible with java version 9. Created an issue to address this in yokozuna repo - suggest this p/r is good to merge. |
so why this file? die with fire
|
Thanks gents. |
Related Issue
#711
How Has This Been Tested?
mvn test&mvn installTypes of changes
Checklist: