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:29:00 UTC

[jira] [Created] (MJLINK-83) Allow adding multiple launchers to a jlink'ed image

Peter Hull created MJLINK-83:
--------------------------------

             Summary: 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


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)