Re: Jar task: --module-version and --main-class options

Bruce Alspaugh <[email protected]>
Newsgroups gmane.comp.jakarta.ant.user
Message-ID <[email protected]>
As requested, I've created a new issue. Is there some reason why Ant 
does not use the JDK's jar tool?

Bruce

[1] https://bz.apache.org/bugzilla/show_bug.cgi?id=62789

On 10/02/2018 12:20 AM, Stefan Bodewig wrote:
> On 2018-10-01, Bruce Alspaugh wrote:
> 
>> Java 9 and later add several new options to the jar tool:
> 
>> https://docs.oracle.com/en/java/javase/11/tools/jar.html
> 
>> I would like to use the --module-version and --main-class options with
>> Ant's Jar task, but I could not find them in the manual:
> 
>> https://ant.apache.org/manual/Tasks/jar.html
> 
>> I can accomplish this using exec, but it would be simpler if I could
>> use those options with the jar task. Can those two options be added?
> 
> I think there already is a Bugzilla enhancement request for --main-class
> but none for --module-version. Can you either please update the existing
> ticket[1] or add a new one for the second part?
> 
> As for "can it be done?": of course, but it may be a bit more difficult
> than you think. Ant does not use the JDK's jar tool at all but rather
> builds the jar by itself (that's just a ZIP with some extra contents,
> after all). So we'll need to figure out from the docs what those
> switches actually do and mimic the outcome.
> 
> Stefan
> 
> [1] https://bz.apache.org/bugzilla/show_bug.cgi?id=62772
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.