You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Andre Tadeu de Carvalho (JIRA)" <ji...@apache.org> on 2018/12/07 20:19:00 UTC
[jira] [Commented] (MJLINK-6) Allow set the jmods path
[ https://issues.apache.org/jira/browse/MJLINK-6?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16713252#comment-16713252 ]
Andre Tadeu de Carvalho commented on MJLINK-6:
----------------------------------------------
Hi,
I have tried to perform the step 0 of this issue, describe here: [https://stackoverflow.com/a/47594270|https://stackoverflow.com/a/47594270,]. I have used OpenJDK 11.0.1 as the main JDK, and I have downloaded OpenJDK 10.0.2 for Windows. In addition, I have [https://github.com/andretadeu/jigsaw-examples/tree/master/9-jmod-jlink] as a sample project.
Firstly, I ran the script *multi-module-compile.sh*, and then I ran the *pack-to-jar.sh*. Secondly, i ran the script to generate all the jmods for this project, by running the script *run-jmod.sh*. Finally, I exported JAVA_HOME to _/home/andre/openjdk-10.0.2_windows-x64_bin/jdk-10.0.2_ (the local of my OpenJDK 10.0.2 for Windows). Running the command below:
{{{color:#205081}/home/andre/.sdkman/candidates/java/11.0.1-open/bin/jlink --module-path /home/andre/openjdk-10.0.2_windows-x64_bin/jdk-10.0.2/jmods:target/jmods --add-modules org.astro,com.andretc83.greetings --launcher runapp=com.andretc83.greetings --output target/dist-win-java-10{color}}}
{color:#333333}and the command:{color}
{color:#205081}{{./target/dist-win-java-10/bin/java -version}}{color}
the result is:
{color:#707070}{{openjdk version "11.0.1" 2018-10-16}}
{{OpenJDK Runtime Environment 18.9 (build 11.0.1+13)}}
{{OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)}}{color}
{color:#333333}and the content of *target/dist-win-java-10* does not contains the headers for Windows, only for Linux.{color}
{color:#333333}I would be glad if someone could improve on this example to understand if what is stated in this issue should really happens, or if I made a mistake in some of the steps I performed and I did not get the correct results due to this error.{color}
> Allow set the jmods path
> ------------------------
>
> Key: MJLINK-6
> URL: https://issues.apache.org/jira/browse/MJLINK-6
> Project: Maven JLink Plugin
> Issue Type: Improvement
> Affects Versions: 3.0.0-alpha-2
> Reporter: Roberto Araujo
> Priority: Minor
> Labels: up-for-grabs
>
> The current version of the plugin hard-coded the `jmods` folder (based on `jlink` binary location). But, for instance, if I want to build a runtime image for Linux running the build in a OSX the runtime image will not be compatible.
> I suggest to allow users define the JDK `jmods` folder, and if nothing is set, use the one based on the JAVA_HOME/Toolchain configuration.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)