Hi, On Fri, Aug 25, 2017 at 6:57 PM, Robert Scholte <[email protected]> wrote: > I'm having a look at the JarArchiver of the plexus-archiver project as used > by maven-jar-plugin. > This archiver does some MANIFEST and index stuff already, so it kind of > makes sense to add the module-descriptor logic here as well.
I think it is a good idea to make Plexus Archiver module aware. I can help you with it if you want. Also I took a look at the changes in the JDK jar tool and I notice a couple of things that it does: 1. The structure of the jar produced is such that the module info entries are placed after the manifest and before the rest of the files. Plexus Archiver does not handle the module info entries differently and they are placed in random order among the rest of the files. 2. It adds/replaces some additional information to the module description such as the list of packages it contains, the hashes of the modules, module version, main class. 3. There is verification that the module descriptor is consistent - exported/opened/provided packages/classes are actually presented in the jar file. I have to double check which of those are part of the specification and which are OpenJdk specific. In any case it sounds like a good idea to have some verification (3.) and to update the packages field with the packages that are actually packaged. The module hashes seem to be OpenJdk specific but they do sound like a nice feature. Maybe we should do some(or all) of the above thing as well, what do you think? The points above convince we even more that the Plexus Archiver should be module aware and the component to verify/modify the module descriptors. BTW what do you think - should we have a new class ModuleJarArchiver that extends JarArchiver or just to modify JarArchiver. There is no new packaging type and from this POV it does sounds logical to just modify the JarArchiver. But on other hand it is extended by WarArchiver & co so they'll become module aware as well. Not completely sure if that is ok. I guess they should be ok as they do not contain any code(modules or not) in their root folder, right? Or I am wrong? Regards, Plamen Totev --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
