Class EarMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugins.ear.AbstractEarMojo
org.apache.maven.plugins.ear.EarMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="ear", defaultPhase=PACKAGE, threadSafe=true, requiresDependencyResolution=TEST) public class EarMojo extends AbstractEarMojo
Builds J2EE Enterprise Archive (EAR) files.
Author:
Stephane Nicoll
  • Field Details

    • escapeString

      @Parameter protected String escapeString
      Expression preceded with this String won't be interpolated \${foo} will be replaced with ${foo}.
      Since:
      2.3.2
  • Constructor Details

    • EarMojo

      @Inject public EarMojo(org.codehaus.plexus.archiver.ear.EarArchiver earArchiver, org.codehaus.plexus.archiver.jar.JarArchiver jarArchiver, org.apache.maven.project.MavenProjectHelper projectHelper, org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager, org.apache.maven.shared.filtering.MavenFileFilter mavenFileFilter, org.apache.maven.shared.filtering.MavenResourcesFiltering mavenResourcesFiltering)
  • Method Details

    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Specified by:
      execute in interface org.apache.maven.plugin.Mojo
      Overrides:
      execute in class AbstractEarMojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException
    • getApplicationXml

      public File getApplicationXml()
      Returns:
      applicationXml
    • setApplicationXml

      public void setApplicationXml(File applicationXml)
      Parameters:
      applicationXml - applicationXml
    • getExcludes

      protected String[] getExcludes()
      Returns a string array of the excludes to be used when assembling/copying the ear.
      Returns:
      an array of tokens to exclude
    • getIncludes

      protected String[] getIncludes()
      Returns a string array of the includes to be used when assembling/copying the ear.
      Returns:
      an array of tokens to include
    • getPackagingExcludes

      public String[] getPackagingExcludes()
      Returns:
      The array with the packaging excludes.
    • setPackagingExcludes

      public void setPackagingExcludes(String packagingExcludes)
      Parameters:
      packagingExcludes - packagingExcludes
    • getPackagingIncludes

      public String[] getPackagingIncludes()
      Returns:
      the arrays with the includes
    • setPackagingIncludes

      public void setPackagingIncludes(String packagingIncludes)
      Parameters:
      packagingIncludes - packagingIncludes
    • unpack

      public void unpack(File source, File destDir, Collection<String> outdatedResources) throws org.codehaus.plexus.archiver.ArchiverException, org.codehaus.plexus.archiver.manager.NoSuchArchiverException, IOException
      Unpacks the module into the EAR structure.
      Parameters:
      source - file to be unpacked
      destDir - where to put the unpacked files
      outdatedResources - currently outdated resources
      Throws:
      org.codehaus.plexus.archiver.ArchiverException - a corrupt archive
      org.codehaus.plexus.archiver.manager.NoSuchArchiverException - if we don't have an appropriate archiver
      IOException - in case of a general IOException
    • isNonFilteredExtension

      public boolean isNonFilteredExtension(String fileName)
      Parameters:
      fileName - the name of the file which should be checked
      Returns:
      true if the name is part of the non filtered extensions; false otherwise