Draft: Building with Jdk 17 - #120
Conversation
| <artifactId>groovy-all</artifactId> | ||
| <version>${org.codehaus.groovy.all.version}</version> | ||
| <type>jar</type> | ||
| <type>pom</type> |
There was a problem hiding this comment.
Just thinking whether it wouldn't be better to change from groovy-all to groovy?
There was a problem hiding this comment.
I didn't do it due to verbosity and having to chase dependencies. For what I tested we depend on at least groovy-<VER>.jar and groovy-ant-<VER>.jar. Maybe more.
BTW, I ran mvn dependency:analyze-report and it looks like we have a number of undeclared dependencies (I uncovered commons-collections while testing and this is why I ran the report), and a number of unused but declared ones.
But I feel insecure proceeding further as I have not yet been able to run the integration tests. I did not arrive to mvn verify , just compile, test and package (skipping javadocs). verify needs more set up, and solving the problem with building javadocs is IMO of higher priority.
Our "analyze report" (at master HEAD):
Dependency Analysis
Used and declared dependencies
| GroupId | ArtifactId | Version | Scope | Classifier | Type | Optional |
|---|---|---|---|---|---|---|
| net.java.dev.jna | jna | 5.6.0 | compile | jar | false | |
| org.codehaus.groovy | groovy-all | 2.4.19 | compile | jar | false | |
| net.sourceforge.htmlunit | htmlunit | 2.15 | compile | jar | false | |
| com.google.guava | guava | 29.0-jre | compile | jar | false | |
| org.slf4j | slf4j-api | 1.7.30 | compile | jar | false | |
| com.squareup.okhttp3 | okhttp | 4.8.0 | compile | jar | false | |
| com.squareup.okhttp3 | okhttp-urlconnection | 4.8.0 | compile | jar | false | |
| org.eclipse.jgit | org.eclipse.jgit | 5.8.0.202006091008-r | compile | jar | false | |
| junit | junit | 4.13 | test | jar | false | |
| org.powermock | powermock-module-junit4 | 2.0.7 | test | jar | false | |
| org.powermock | powermock-api-mockito2 | 2.0.7 | test | jar | false | |
| org.wildfly.extras.creaper | creaper-core | 1.6.1 | compile | jar | false |
Used but undeclared dependencies
| GroupId | ArtifactId | Version | Scope | Classifier | Type | Optional |
|---|---|---|---|---|---|---|
| commons-io | commons-io | 2.4 | compile | jar | false | |
| commons-collections | commons-collections | 3.2.1 | compile | jar | false | |
| org.powermock | powermock-core | 2.0.7 | test | jar | false | |
| xml-apis | xml-apis | 1.4.01 | compile | jar | false | |
| org.apache.commons | commons-lang3 | 3.3.2 | compile | jar | false |
Unused but declared dependencies
| GroupId | ArtifactId | Version | Scope | Classifier | Type | Optional |
|---|---|---|---|---|---|---|
| org.apache.ant | ant | 1.10.8 | compile | jar | false | |
| ch.qos.logback | logback-classic | 1.2.3 | compile | jar | false | |
| org.wildfly.extras.creaper | creaper-commands | 1.6.1 | compile | jar | false | |
| org.wildfly.core | wildfly-controller-client | 12.0.3.Final | provided | jar | false | |
| org.wildfly.core | wildfly-cli | 12.0.3.Final | provided | jar | false |
e80fb8e to
4559e86
Compare
class can't have the same name as package
Those are changes needed to build noe-core with jdk17
The changes work and build the tests generating classes for target java 1.6 (current) or java 1.8, except there is an error in building the javadocs. To get it working:
This code builds with openjdk-11 and openjdk-17 and passes the tests, but the javadoc fails the same with both jdks. The error is:
And can be solved by adding
:../classesto the classpath option incore/target/apidocs/optionsand re-runningBut I don't know how to fix it with maven, It seems to miss adding the generated classes to the classpath.
Note: Trying to generate the classes for target java 11 or 15 produces further errors