For now I have two examples of modularized Java applications
- standard-multi-modules: generates a 986MB Docker image to run a simple application
- multi-modules-jmod-jlink: generates a 59MB Docker image to run the same application
- fairy-tales: testing how to build the example in https://github.com/gradle-guides/building-java-9-modules in Maven
- fairy-tales-jmod-jlink: another version of fairy-tales without Guava and using JMOD and JLink
- modularized-args4j-usage: example on how a modularized library that needs to use reflection in the application's classes works with jmod and jlink.
To run these examples, you must have installed:
- Java 11
- Maven 3.6.0
- Docker CE or EE
Firstly, you must clone the maven-jmod-plugin and maven-jlink-plugin repository to build the plugins:
For Maven JMOD plugin:
git clone https://github.com/apache/maven-jmod-plugin.git
cd maven-jmod-plugin
For Maven JLINK plugin:
git clone https://github.com/apache/maven-jlink-plugin.git
cd maven-jmod-plugin
and then build each plugin:
mvn clean install
Finally, you can select either of the projects to build.