Investigate if a build can be created for JDK8 and JDK9
One assumption of the current release plan is that it is not (easily) possible to create a build for both JDK8 and JDK9. If this is possible, then we could simplify the release plan and support both JDK8 and JDK9.
One advantage of using JDK9 for the build is that there is an easy way to declare a dependency on the javac and tools modules. Unfortunately, when that is done, it is no longer possible to have JDK9 build a JDK8 compatible module.
A possible fix would be to use two pom files, one for JDK8 and one for JDK9. Our jars would need to have a jdk suffix (jdk8 or jdk9) to indicate which is which. The two pom files might share a single parent pom.
What needs to be investigated:
- How hard is it to set up a build for two pom files, each using different JDKs?
- Can we create module files that are only included in the JDK9 build and do not interfere with the JDK8 build?
- The complication of what our exported modules are for AndHow will need to be sorted out - we can save that for a later task.
Just a thought, @eeverman , can't we do this using maven profiles? I don't really know because I haven't tried so far (will probably spend a weekend investigating these approaches), but mvn package -P<profile-name> might be a solution?
I'm going to push this back for now. We don't need it for 1.4.1.
@alex-kar Do you know JDK9 modules well? This project will need to move to JDK 9 soon and its not clear to me how hard it will be to support JDK8 and JDK9+ at the same time.
One related issue is that it is not possible (for this project) to use a JDK9+ compiler to make a JDK8 compatible package. That is normally possible, but compiling an Annotation Processor requires the special --add-modules=jdk.compiler switch to put some classes normally only available to the compiler on the project class path. As a result, the annotation-processor module would at least require compilation with two JDKs to make two jars.