Hi Robert,
On 1/15/2018 10:10 PM, Robert Scholte wrote:
> Hi Plamen,
>
> Alan Bateman has provided some valuable information:
Thank you for sharing this. It's really helpful.
On 1/15/2018 10:10 PM, Robert Scholte wrote:
1. MR JARs weren't mentioned. The jar tool does validation to ensure
that the API provided by the classes in the JAR file is the same for all
versions.
Validation is indeed something I haven't dig in yet. It is interesting
to know what is the impact of Maven not doing validation of modular JAR
files.
On 1/15/2018 10:10 PM, Robert Scholte wrote:
2. The Module, ModulePackages, and ModuleMainClass class file attributes
are specified in the JVMS. ASM supports them so the Archiver could use
that. The ModulePackages attribute is optional. If this attribute is not
present then the JAR file will be scanned to get the set of packages in
the module.
If the JAR is scanned when ModulePackages is not present then for the
time being is ok to not implement it.
On 1/15/2018 10:10 PM, Robert Scholte wrote:
The ModuleTarget, ModuleResolution, and ModuleHashes class file
attributes are JDK-specific so you won't find these in the JVMS. The
ModuleTarget attribute is documented in JEP 261, the others aren't there
yet but ASM has support in org.objectweb.asm.commons for these
attributes so you should be okay.
All of those could be set with ASM (I think) but setting them is the
easy part. Calculating the hashes for ModuleHashes will require some
work though.
On 1/15/2018 10:09 PM, Andreas Sewe wrote:
> Also, if two separate tools modify the JAR, the goal of reproducible
> builds is again a bit harder to accomplish. So, please try to use an
> internal, written-in-Java solution if possible.
This is a valid point. I don't think it would be possible to set the
entries timestamps using the JDK jar tool. But a bit harder does not
mean impossible. It could be achieved by "post-processing" the resulting
jar file.
Another point I think we should have in mind is the fact that every time
the class format version is increased we should update the ASM library
and release a new version of the JAR plugin otherwise the build will
fail. Also the users should update the JAR plugin version. That may
prove to be a bit inconvenient.
From my point of view the trade-off is ease of maintainability vs
flexibility and control.
Regards,
Plamen Totev
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org