Class EarMavenArchiver


  • public class EarMavenArchiver
    extends org.apache.maven.archiver.MavenArchiver
    A custom MavenArchiver implementation that takes care of setting the right classpath value according to the actual path of bundled files.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CLASS_PATH_KEY
      Class-Path.
      private java.util.List<EarModule> earModules  
      • Fields inherited from class org.apache.maven.archiver.MavenArchiver

        REPOSITORY_LAYOUT, REPOSITORY_LAYOUT_NONUNIQUE, SIMPLE_LAYOUT, SIMPLE_LAYOUT_NONUNIQUE
    • Constructor Summary

      Constructors 
      Constructor Description
      EarMavenArchiver​(java.util.List<EarModule> earModules)
      Creates an instance with the ear modules that will be packaged in the EAR archive.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      protected java.lang.String generateClassPathEntry​(java.lang.String classPathPrefix)
      Generates the Class-Path entry of the manifest according to the list of ear modules.
      org.codehaus.plexus.archiver.jar.Manifest getManifest​(org.apache.maven.execution.MavenSession session, org.apache.maven.project.MavenProject project, org.apache.maven.archiver.MavenArchiveConfiguration config)
      org.codehaus.plexus.archiver.jar.Manifest getManifest​(org.apache.maven.project.MavenProject project, org.apache.maven.archiver.MavenArchiveConfiguration config)
      Deprecated. 
      protected java.lang.String getUserSuppliedClassPathEntry​(org.apache.maven.archiver.MavenArchiveConfiguration config)  
      • Methods inherited from class org.apache.maven.archiver.MavenArchiver

        configureReproducible, configureReproducibleBuild, createArchive, getArchiver, getManifest, getManifest, getManifest, parseBuildOutputTimestamp, parseOutputTimestamp, setArchiver, setBuildJdkSpecDefaultEntry, setCreatedBy, setOutputFile
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CLASS_PATH_KEY

        public static final java.lang.String CLASS_PATH_KEY
        Class-Path.
        See Also:
        Constant Field Values
      • earModules

        private final java.util.List<EarModule> earModules
    • Constructor Detail

      • EarMavenArchiver

        public EarMavenArchiver​(java.util.List<EarModule> earModules)
        Creates an instance with the ear modules that will be packaged in the EAR archive.
        Parameters:
        earModules - the intitialized list of ear modules
    • Method Detail

      • getManifest

        public org.codehaus.plexus.archiver.jar.Manifest getManifest​(org.apache.maven.project.MavenProject project,
                                                                     org.apache.maven.archiver.MavenArchiveConfiguration config)
                                                              throws org.codehaus.plexus.archiver.jar.ManifestException,
                                                                     org.apache.maven.artifact.DependencyResolutionRequiredException
        Deprecated.
        Parameters:
        project - MavenProject
        config - MavenArchiveConfiguration
        Returns:
        Manifest
        Throws:
        org.codehaus.plexus.archiver.jar.ManifestException - in case of an error
        org.apache.maven.artifact.DependencyResolutionRequiredException - in case of an resolution error.
      • getManifest

        public org.codehaus.plexus.archiver.jar.Manifest getManifest​(org.apache.maven.execution.MavenSession session,
                                                                     org.apache.maven.project.MavenProject project,
                                                                     org.apache.maven.archiver.MavenArchiveConfiguration config)
                                                              throws org.codehaus.plexus.archiver.jar.ManifestException,
                                                                     org.apache.maven.artifact.DependencyResolutionRequiredException
        Overrides:
        getManifest in class org.apache.maven.archiver.MavenArchiver
        Throws:
        org.codehaus.plexus.archiver.jar.ManifestException
        org.apache.maven.artifact.DependencyResolutionRequiredException
      • generateClassPathEntry

        protected java.lang.String generateClassPathEntry​(java.lang.String classPathPrefix)
        Generates the Class-Path entry of the manifest according to the list of ear modules.
        Parameters:
        classPathPrefix - the classpath prefix to use
        Returns:
        the Class-Path entry
      • getUserSuppliedClassPathEntry

        protected java.lang.String getUserSuppliedClassPathEntry​(org.apache.maven.archiver.MavenArchiveConfiguration config)
        Parameters:
        config - MavenArchiveConfiguration
        Returns:
        The class path entry.