You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Peter Hull (Jira)" <ji...@apache.org> on 2024/03/23 08:32:00 UTC
[jira] [Commented] (MJLINK-83) Allow adding multiple launchers to a jlink'ed image
[ https://issues.apache.org/jira/browse/MJLINK-83?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17830039#comment-17830039 ]
Peter Hull commented on MJLINK-83:
----------------------------------
I have implemented this myself as it was a very small change
[https://github.com/pedro-w/maven-jlink-plugin/commit/195eac10f5146da37128ba5d26b631b32eba818d]
I can submit as a PR if this is deemed useful
> Allow adding multiple launchers to a jlink'ed image
> ---------------------------------------------------
>
> Key: MJLINK-83
> URL: https://issues.apache.org/jira/browse/MJLINK-83
> Project: Maven JLink Plugin
> Issue Type: Improvement
> Affects Versions: 3.2.0
> Environment: (applies to all platforms)
> Reporter: Peter Hull
> Priority: Minor
>
> The {{jlink}} command line tool allows the {{--launcher}} argument to be specified multiple times to create multiple launcher scripts in the image. However the maven plugin only passes on one {{<launcher>}} element from its configuration section to the tool. If multiple are specified, the last one takes precedence. I would like to improve this so the plugin will pass multiple launcher specs on to the {{jlink}} tool. I suggest the config should look like:
> {noformat}
> <launcher>command=module/main</launcher>{noformat}
> (as before, for backward compatibility and the common case where there is only one)
> or
>
> {noformat}
> <launchers>
> <launcher>command1=module1/main1</launcher>
> <launcher>command2=module2/main2</launcher>
> ...
> </launchers>
> {noformat}
>
> where {{<launchers>}} can contain zero or more {{<launcher>}} elements with the same syntax as the existing element.
> One remaining question - what do do if the config specifies both {{<launcher>}} and {{<launchers>}} - combine the two or signal an error?
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)