You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "jira-importer (via GitHub)" <gi...@apache.org> on 2025/02/01 20:31:40 UTC

[I] [MJLINK-6] Allow set the jmods path [maven-jlink-plugin]

jira-importer opened a new issue, #259:
URL: https://github.com/apache/maven-jlink-plugin/issues/259

   **[Roberto Araujo](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=andrioli)** opened **[MJLINK-6](https://issues.apache.org/jira/browse/MJLINK-6?redirect=false)** and commented
   
   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.
   
   
   ---
   
   **Remote Links:**
   - [GitHub Pull Request #6
   ](https://github.com/apache/maven-jlink-plugin/pull/6)
   
   2 votes, 7 watchers
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MJLINK-6] Allow set the jmods path [maven-jlink-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #259:
URL: https://github.com/apache/maven-jlink-plugin/issues/259#issuecomment-2629101385

   **[Roberto Araujo](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=andrioli)** commented
   
   [Jim Sellers](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=sellersj) this is exactly my use case
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MJLINK-6] Allow set the jmods path [maven-jlink-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #259:
URL: https://github.com/apache/maven-jlink-plugin/issues/259#issuecomment-2629101384

   **[Jim Sellers](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=sellersj)** commented
   
   [Roberto Araujo](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=andrioli) is this the use case you're looking for?
   https://stackoverflow.com/a/47611708/2055199
   
    
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MJLINK-6] Allow set the jmods path [maven-jlink-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #259:
URL: https://github.com/apache/maven-jlink-plugin/issues/259#issuecomment-2629101379

   **[Karl Heinz Marbaise](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=khmarbaise)** commented
   
   You are right, but you can't build on OS X for runtime on Windows or on Linux for runtime on Windows...cause the resulting runtime image is currently limited to the platform you build on...
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MJLINK-6] Allow set the jmods path [maven-jlink-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #259:
URL: https://github.com/apache/maven-jlink-plugin/issues/259#issuecomment-2629101395

   **[Roberto Araujo](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=andrioli)** commented
   
   Tested and is working fine. Tested in Linux (Travis CI) and macOS (my machine) with Java 9, 10, 11 and 12
   
    
   
   My suggestion is also to include an WARN log when the `sourceJdkModules` folder is invalid. Note that in case we use an invalid folder we will fallback to the folder based on `jlink` binary location and the user will not notice the problem. (happened to me)
   
    
   
   Example project with success use: https://github.com/andrioli/maven-jlink-docker-example
   
    
   
   Thanks
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MJLINK-6] Allow set the jmods path [maven-jlink-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #259:
URL: https://github.com/apache/maven-jlink-plugin/issues/259#issuecomment-2629101387

   **[Karl Heinz Marbaise](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=khmarbaise)** commented
   
   If someone will help just start with making an test project which shows how it works and document the steps how to get there...
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MJLINK-6] Allow set the jmods path [maven-jlink-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #259:
URL: https://github.com/apache/maven-jlink-plugin/issues/259#issuecomment-2629101394

   **[Karl Heinz Marbaise](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=khmarbaise)** commented
   
   Hi,
   uploaded an https://repository.apache.org/content/repositories/snapshots/org/apache/maven/plugins/maven-jlink-plugin/3.0.0-alpha-2-SNAPSHOT/maven-jlink-plugin-3.0.0-alpha-2-20190214.180426-81.pom ... or just clone the git repo and do `mvn clean install` ?...
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MJLINK-6] Allow set the jmods path [maven-jlink-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #259:
URL: https://github.com/apache/maven-jlink-plugin/issues/259#issuecomment-2629101391

   **[Robert Scholte](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=rfscholte)** commented
   
   Fixed in [f51f117d08a3f84072c85bb60d496a99227597cb](https://gitbox.apache.org/repos/asf?p=maven-jlink-plugin.git;a=commit;h=f51f117d08a3f84072c85bb60d496a99227597cb)
   Thanks for the patch!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MJLINK-6] Allow set the jmods path [maven-jlink-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #259:
URL: https://github.com/apache/maven-jlink-plugin/issues/259#issuecomment-2629101390

   **[Andre Tadeu de Carvalho](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=andretadeu)** commented
   
   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**. After that, I ran **run-jlink.sh <Path to JDK>**.
   
   This resulted in a reduced version Windows JDK in **dist** folder.
   
    
   
   PS: In the previous attempt, I made a mistake because I used $JAVA_HOME, which in my laptop is managed by SDKMAN.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MJLINK-6] Allow set the jmods path [maven-jlink-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #259:
URL: https://github.com/apache/maven-jlink-plugin/issues/259#issuecomment-2629101381

   **[Roberto Araujo](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=andrioli)** commented
   
   But I can build a runtime image for Linux on OS X (At least for a docker containers). E.g., If I use the `--module-path` option the `jmod` folder from the Linux distribution (available at http://jdk.java.net/9/) the assembled runtime image will work on Docker container (tested with debian:sid). But if I use the `jmod` folder from my JAVA_HOME (i'm on OS X) the assembled runtime image will not work in the container (the binaries are not compatible).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MJLINK-6] Allow set the jmods path [maven-jlink-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #259:
URL: https://github.com/apache/maven-jlink-plugin/issues/259#issuecomment-2629101383

   **[Roberto Araujo](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=andrioli)** commented
   
   Can I help with this issue? If so, how can I proceed?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MJLINK-6] Allow set the jmods path [maven-jlink-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #259:
URL: https://github.com/apache/maven-jlink-plugin/issues/259#issuecomment-2629101392

   **[Roberto Araujo](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=andrioli)** commented
   
   Can you guys release a SNAPSHOT version? So I can test it.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org