You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Java 9 introduces Java Platform Module System and it comes with changes to the JAR files as well. The modules are packaged into modular JAR files - a JAR file that has module-info.class file in its top-level directory. Unlike the regular JAR files, meta information such as the module version or it's main class(for the executable JAR files) are stored inside module-info.class instead of the manifest file.
A support to set the module version and main class should be added to Plexus Archiver. This feature will help tools like Maven to produce modular JAR files.
The text was updated successfully, but these errors were encountered:
You can already create modular jar files with Maven which means having a module-info.java (compiled) within the jar file...This can simply be achieved by using the default structure of maven and add the module-info.java in src/main/java and using a JDK 9...
Furthermore the support for Jlink / JMod plugin in its first alpha state is done (Currenty the JMod plugin needs some more things). I think within less than a week a first alpha will be available on Maven Central.
@khmarbaise you're right, module JAR is just regular JAR file with module-info.class. I guess This feature will help tools like Maven to produce modular JAR files. is bad choice of words. I didn't mean to say that Maven cannot create modular jar. What I meant is that there are some attributes that you cannot set in the module-info.java file such as the module version and the module main class. As far I know to do that a byte code manipulation of the compiled class is required. There is discussion on the Maven dev list(https://www.mail-archive.com/dev@maven.apache.org/msg114594.html) regarding which component is best suited to do such manipulation. Please feel free to join it if you think Plexus Archiver is not the best place for such functionality or if it already exists.
Java 9 introduces Java Platform Module System and it comes with changes to the JAR files as well. The modules are packaged into modular JAR files - a JAR file that has
module-info.class
file in its top-level directory. Unlike the regular JAR files, meta information such as the module version or it's main class(for the executable JAR files) are stored insidemodule-info.class
instead of the manifest file.A support to set the module version and main class should be added to Plexus Archiver. This feature will help tools like Maven to produce modular JAR files.
The text was updated successfully, but these errors were encountered: