Is there a maven jigsaw jlink plugin?

Does maven have a plugin for the new Java 9 jlink , which I searched on the Internet but could not find anything official from the maven team.

+8
java maven java-9 jigsaw jlink
source share
2 answers

Yes Some progress has been made in creating one of the Github / maven-plugins for it.

 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jlink-plugin</artifactId> <version>3.0.0-SNAPSHOT</version> </plugin> 

The plugin in its code reads as adaptive to the JEP-282 and JEP-220 of the sentences.

And although this may seem like a link too much answer. There is a working example from @khmarbaise on Github for this, which requires a toolchain with -

 <configuration> <jdkHome>/Library/Java/JavaVirtualMachines/jdk1.9.0_ea+170.jdk/Contents/Home</jdkHome> </configuration> 

Plus a side of the author’s note , citing -

Currently, nothing more than a proof of concept. Everything here is speculative!

Edit : - As indicated in the comments, you can find more information @ How to create a Java working environment with Maven .

+6
source share

I am working on ModiTect, a common feature for Java 9 modules. One of the goals of the ModeeTect Maven plugin is to create runtime images via jlink:

 <plugin> <groupId>org.moditect</groupId> <artifactId>moditect-maven-plugin</artifactId> <version>1.0.0-SNAPSHOT</version> <executions> <execution> <id>create-runtime-image</id> <phase>package</phase> <goals> <goal>create-runtime-image</goal> </goals> <configuration> <modulePath> <path>${project.build.directory}/modules</path> </modulePath> <modules> <module>com.example.module1</module> <module>com.example.module2</module> </modules> <launcher> <name>helloWorld</name> <module>com.example.module1</module> </launcher> <outputDirectory> ${project.build.directory}/jlink-image </outputDirectory> </configuration> </execution> </executions> </plugin> 

The plugin is under active development right now and should be built from the source at the moment (it will deploy the first version in Maven Central soon).

+3
source share

All Articles