Summary: | Update JAR Task to Specify --module-version Parameter | ||
---|---|---|---|
Product: | Ant | Reporter: | Bruce Alspaugh <alspaughb> |
Component: | Core tasks | Assignee: | Ant Notifications List <notifications> |
Status: | NEW --- | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 1.10.1 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All |
Description
Bruce Alspaugh
2018-10-02 05:42:34 UTC
I did a very small test: - created a simple module-info.java module com.greetings { } - compiled with JDK 10.0.1 (Win7-64bit) javac . - created a module jar with JDK 10 jar.exe --create --file foo.jar --main-class=com.foo.Main --module-version=1.0 . - compared the JAR with the parameters and the original sources What I could see is, that 1) the paramater --module-version is placed in the compiled module-info.class file 2) the parameter --main-class is placed in the manifest AND in the compiled module-info.class Adding the value to the generated manifest should be trivial, but changing the compiled file ... needs discussion. ;-) FWIW, the --hash-modules option (and some others) of the jar command to plays a role according to[1] in the generated jar file. More specifically, the "Packaging: Modular JAR files" section of [1] has details of these options. [1] http://openjdk.java.net/jeps/261 |