The use of Maven submodules to build a Multi Release JAR was motivated by its compatibility with popular IDEs.
There are two configuration properties to be aware of when configuring your local development environment:
Settings are usually synchronised with maven toolchain configuration, otherwise the Java version for a maven module should be set as follows:
Maven submodule | JDK |
---|---|
datasketches-memory | 8 |
datasketches-memory-java8 | 8 |
datasketches-memory-java11 | 11 |
In order to compile Maven modules in Java versions 11 and above, it is necessary to provide the following arguments to the compiler. These are usually synchronised with the pom.xml
configuration:
<compilerArgs> <arg>--add-exports</arg> <arg>java.base/jdk.internal.ref=org.apache.datasketches.memory</arg> </compilerArgs>
Note that the following configuration was verified using IntelliJ IDEA 2021.1.2 (Community Edition).
Ensure that the correct SDK is used for each module using the IntelliJ project structure dialog:
Ensure that the required JPMS arguments are set for the compiler (Java 11 only).
These should be detected and set automatically based on the pom.xml
configuration.