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 synchronized 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 synchronized 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 Eclipse Version: 2020-12 (4.18.0)
The Eclipse Maven plugin is used to generate Eclipse IDE files. In order to run the eclipse plugin use:
$ mvn clean eclipse:eclipse -DskipTests=true
More information about using the eclipse plugin with multi-module Maven builds can be found in the Maven Multiple Module Projects document.
Please note that this plugin is retired and no longer maintained!
From the Package Explorer View:
Although these should be set automatically, the Eclipse IDE does not currently configure these settings according to the pom.xml
- see this Eclipse Bug. Ensure that the required JPMS arguments are set for the compiler (Java 11 only).
datasketches-memory-java11
project, and select Properties/Java Build Path.java.base
package.jdk.internal.ref
, and org.apache.datasketches.memory
as the target module.Note: These arguments need only be supplied for datasketches-memory-java11
.
This should be set automatically by the IDE. However, you may ensure that the correct Java compliance level is set for each module by using the Eclipse Java Compiler
dialog.
You might need to verify this for each module, making sure the correct compliance level is used:
datasketches-memory-java11
should use level 11 compliance.datasketches-memory-java8
should use level 1.8 compliance.This should be set automatically by the IDE. However, you may ensure that the correct JRE is used for each module by using the Eclipse Java Build Path dialog.
datasketches-memory-java11
project, and click on Java Build Path.datasketches-memory-java8
module, right-click on the src/test/java
directory.