Add ability to specify module version and main class · Issue #67 · codehaus-plexus/plexus-archiver · GitHub
Skip to content

Add ability to specify module version and main class #67

Closed

Description

@plamentotev

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.

Activity

  1. self-assigned this
    on Aug 29, 2017
  2. added this to the milestone on Aug 29, 2017
  3. khmarbaise commented on Sep 13, 2017

    @khmarbaise
    Member

    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.

  4. plamentotev commented on Sep 14, 2017

    @plamentotev
    Author

    @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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions