Skip to content

Experimental examples on how to use maven-jmod-plugin and maven-jlink-plugin to build Java applications with JPMS

License

Notifications You must be signed in to change notification settings

java-modularity-examples/maven-jigsaw-examples

Folders and files

NameName
Last commit message
Last commit date
May 14, 2019
May 14, 2019
May 14, 2019
May 14, 2019
May 14, 2019
Dec 12, 2018
Dec 12, 2018
Feb 19, 2019

Repository files navigation

maven-jigsaw-examples

For now I have two examples of modularized Java applications

  1. standard-multi-modules: generates a 986MB Docker image to run a simple application
  2. multi-modules-jmod-jlink: generates a 59MB Docker image to run the same application
  3. fairy-tales: testing how to build the example in https://github.com/gradle-guides/building-java-9-modules in Maven
  4. fairy-tales-jmod-jlink: another version of fairy-tales without Guava and using JMOD and JLink
  5. modularized-args4j-usage: example on how a modularized library that needs to use reflection in the application's classes works with jmod and jlink.

Prerequisites

To run these examples, you must have installed:

  • Java 11
  • Maven 3.6.0
  • Docker CE or EE

How to build

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.

About

Experimental examples on how to use maven-jmod-plugin and maven-jlink-plugin to build Java applications with JPMS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published