Improved docs
git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@1807811 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 152ccdc..0087cf2 100644
--- a/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java
+++ b/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java
@@ -233,7 +233,8 @@
private ZipArchiver zipArchiver;
/**
- * Name of the generated ZIP file.
+ * Name of the generated ZIP file in the <code>target</code> directory.
+ * This will not change the name of the installed/deployed file.
*/
@Parameter( defaultValue = "${project.build.finalName}", readonly = true )
private String finalName;
diff --git a/src/site/apt/index.apt.vm b/src/site/apt/index.apt.vm
index 71ad63c..1f69043 100644
--- a/src/site/apt/index.apt.vm
+++ b/src/site/apt/index.apt.vm
@@ -28,7 +28,7 @@
${project.name}
- The JLink Plugin is intended to create a {{{http://openjdk.java.net/jeps/220}Modular Run-Time Images}}
+ The JLink Plugin is intended to create a {{{http://openjdk.java.net/jeps/220}Modular Java Run-Time Images}}
via {{{http://openjdk.java.net/jeps/282}jlink}}.
NOTE: This is an alpha release which means everything can change until we reach the first
diff --git a/src/site/apt/usage.apt.vm b/src/site/apt/usage.apt.vm
index a43696d..ff42dc7 100644
--- a/src/site/apt/usage.apt.vm
+++ b/src/site/apt/usage.apt.vm
@@ -59,9 +59,21 @@
</project>
+-----
- The configuration elements contains the configuration for the plugin
+ The configuration element contains the configuration for the plugin
{{{https://maven.apache.org/guides/mini/guide-configuring-plugins.html}}like any other Maven plugin}}.
-
+ The different elements which can be configured for this plugin can identified by the
+ {{{./plugin-info.html}goals documentation}}.
+
+* Requirements
+
+ Based on the foundation of the plugin it is required to have JDK 9 installed. This means
+ either you have it configured via <<JAVA_HOME>> which means to run the whole
+ Maven build with JDK 9 or via <<Toolchains>>.
+
+ Howto configure Maven related to Toolchains can be read in the
+ {{{https://maven.apache.org/guides/mini/guide-using-toolchains.html}Toolchains documentation}}.
+
+
* 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
diff --git a/src/test/java/org/apache/maven/plugins/jlink/AbsractJLinkMojoTest.java b/src/test/java/org/apache/maven/plugins/jlink/AbsractJLinkMojoTest.java
index bfdf603..630abd8 100644
--- a/src/test/java/org/apache/maven/plugins/jlink/AbsractJLinkMojoTest.java
+++ b/src/test/java/org/apache/maven/plugins/jlink/AbsractJLinkMojoTest.java
@@ -21,11 +21,19 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+import java.io.ByteArrayOutputStream;
import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
import java.util.Arrays;
import java.util.Collections;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.logging.Log;
+import org.codehaus.plexus.util.cli.CommandLineException;
+import org.codehaus.plexus.util.cli.Commandline;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
@@ -41,6 +49,7 @@
public void before()
{
this.mojoMock = mock( AbstractJLinkMojo.class, Mockito.CALLS_REAL_METHODS );
+ when( mojoMock.getLog() ).thenReturn( mock( Log.class ) );
}
@Test
@@ -106,4 +115,25 @@
assertThat( result ).isEqualTo( "A,B" );
}
+ @Test
+ public void xxx()
+ throws MojoExecutionException, IOException, CommandLineException
+ {
+ Process p = mock( Process.class );
+
+ String b = "Error occured";
+ byte[] bytes = b.getBytes();
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ baos.write( bytes );
+
+ when (p.getOutputStream()).thenReturn( baos );
+
+ Commandline cmd = mock( Commandline.class );
+ when (cmd.execute()).thenReturn( p );
+
+ File outputDirectory = mock( File.class );
+
+ mojoMock.executeCommand( cmd, outputDirectory );
+
+ }
}