Class EarMavenArchiver

java.lang.Object
org.apache.maven.archiver.MavenArchiver
org.apache.maven.plugins.ear.util.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.
Author:
Stephane Nicoll
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Class-Path.

    Fields inherited from class org.apache.maven.archiver.MavenArchiver

    REPOSITORY_LAYOUT, REPOSITORY_LAYOUT_NONUNIQUE, SIMPLE_LAYOUT, SIMPLE_LAYOUT_NONUNIQUE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance with the ear modules that will be packaged in the EAR archive.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    generateClassPathEntry(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 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 Details

  • Constructor Details

    • EarMavenArchiver

      public EarMavenArchiver(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 Details

    • 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 String generateClassPathEntry(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 String getUserSuppliedClassPathEntry(org.apache.maven.archiver.MavenArchiveConfiguration config)
      Parameters:
      config - MavenArchiveConfiguration
      Returns:
      The class path entry.