Class ModularJarArchiver

  • All Implemented Interfaces:
    Archiver, FinalizerEnabled, org.codehaus.plexus.logging.LogEnabled, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
    Direct Known Subclasses:
    JarToolModularJarArchiver

    public abstract class ModularJarArchiver
    extends JarArchiver
    Base class for creating modular JAR archives. Subclasses are required to be able to handle both JAR archives with module descriptor (modular JAR) and without ("regular" JAR). That would allow clients of this class to use it without prior knowledge if the classes they are going to add are part of module (contain module descriptor class) or not.
    Since:
    3.6
    • Constructor Detail

      • ModularJarArchiver

        public ModularJarArchiver()
    • Method Detail

      • getModuleMainClass

        public java.lang.String getModuleMainClass()
      • setModuleMainClass

        public void setModuleMainClass​(java.lang.String moduleMainClass)
        Sets the module main class. Ignored if the JAR file does not contain module descriptor.

        Note that implementations may choose to replace the value set in the manifest as well.

        Parameters:
        moduleMainClass - the module main class.
      • getModuleVersion

        public java.lang.String getModuleVersion()
      • setModuleVersion

        public void setModuleVersion​(java.lang.String moduleVersion)
        Sets the module version. Ignored if the JAR file does not contain module descriptor.
        Parameters:
        moduleVersion - the module version.