o Changed ResolutionScope from COMPILE_PLUS_RUNTIME
to RUNTIME only.
o Improved usage docs.
git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@1807382 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java b/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java
index 6ddbd0b..122b859 100644
--- a/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java
+++ b/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java
@@ -60,9 +60,8 @@
*
* @author Karl Heinz Marbaise <a href="mailto:khmarbaise@apache.org">khmarbaise@apache.org</a>
*/
-// TODO: Check if the resolution scope is correct?
// CHECKSTYLE_OFF: LineLength
-@Mojo( name = "jlink", requiresDependencyCollection = ResolutionScope.COMPILE_PLUS_RUNTIME, defaultPhase = LifecyclePhase.PACKAGE, requiresProject = true )
+@Mojo( name = "jlink", requiresDependencyCollection = ResolutionScope.RUNTIME, defaultPhase = LifecyclePhase.PACKAGE, requiresProject = true )
// CHECKSTYLE_ON: LineLength
public class JLinkMojo
extends AbstractJLinkMojo
diff --git a/src/site/apt/usage.apt.vm b/src/site/apt/usage.apt.vm
index f5db5ea..a43696d 100644
--- a/src/site/apt/usage.apt.vm
+++ b/src/site/apt/usage.apt.vm
@@ -65,7 +65,8 @@
* Usage of the Maven JLink Plugin
Usually you will use the Maven JLink Plugin to create a Run Time Image from one or more modules within
- a multi module build. In other words it is not possible to create a Run Time Image from a single Maven
+ a multi module build.
+ In other words it is not possible to create a Run Time Image from a single Maven
Project within the same single Maven Project.
Let us assume you have a multi module structure which contains two modules <<mod-1>> and <<mod-2>>
which you like to put into the resulting Run Time Image.
@@ -133,7 +134,7 @@
</project>
+-----
- If you like to create a Java Run Time Image of your modules the way is to create a
+ If you like to create a Java Run Time Image of your modules you have to create a
separate module <<mod-jlink>> which contains the configuration to create the Run
Time Image which looks similar like this:
@@ -166,8 +167,8 @@
Before you can do this you have to add the configuration to the parent like shown
in {{{Configuration_of_the_Maven_JLink_Plugin}Configuration of the Maven JLink Plugin}}.
- Now you need to define which modules will be linked into the resulting Java Run Time Image which simply
- being done by defining the modules as dependencies to your <<mod-jlink>> module like this:
+ Now you need to define which modules should be linked into the resulting Java Run Time Image which simply
+ can be done by defining the modules as dependencies to your <<mod-jlink>> module like this:
+-----
<project ...>
@@ -197,26 +198,27 @@
After you have added the appropriate configuration you can simply create the Java Run Time Image by
- calling from the root of your directory structure:
+ calling from the root of your multi module project like this:
+----
mvn clean package
+----
- There will be some output lines like this:
+ There are some output lines similar like this:
+----
[INFO]
[INFO] --- maven-jlink-plugin:${project.version}:jlink (default-jlink) @ mod-jlink ---
[INFO] Toolchain in maven-jlink-plugin: jlink [ /.../jdk1.9.0_ea+181.jdk/Contents/Home/bin/jlink ]
[INFO] The following dependencies will be linked into the runtime image:
-[INFO] -> com.corporate.project:mod-1:jar:1.0-SNAPSHOT
-[INFO] -> com.corporate.project:mod-2:jar:1.0-SNAPSHOT
+[INFO] -> module: com.soebes.nine.one.jar ( /.../mod-1/target/mod-1-1.0-SNAPSHOT.jar )
+[INFO] -> module: com.soebes.nine.two.jar ( /.../mod-2/target/mod-2-1.0-SNAPSHOT.jar )
[INFO] Building zip: /.../mod-jlink/target/mod-jlink-1.0-SNAPSHOT.zip
[INFO]
+----
- If you like to install the resulting Java Run Time Image you can of course use:
+ If you like to install the resulting Java Run Time Image files into your local cache
+ you can achieve this by using:
+----
mvn clean install