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

@Mojo(name="unpack", defaultPhase=PROCESS_SOURCES, requiresProject=false, threadSafe=true) public class UnpackMojo extends AbstractFromConfigurationMojo
Goal that retrieves a list of artifacts from the repository and unpacks them in a defined location.
Since:
1.0
Author:
Brian Fox
  • Constructor Details

    • UnpackMojo

      @Inject public UnpackMojo(org.apache.maven.execution.MavenSession session, org.sonatype.plexus.build.incremental.BuildContext buildContext, org.apache.maven.project.MavenProject project, org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager, UnpackUtil unpackUtil, org.eclipse.aether.RepositorySystem repositorySystem)
  • Method Details

    • doExecute

      protected void doExecute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Main entry into mojo. This method gets the ArtifactItems and iterates through each one passing it to unpackArtifact.
      Specified by:
      doExecute in class AbstractDependencyMojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException - with a message if an error occurs
      org.apache.maven.plugin.MojoFailureException - MojoFailureException
      See Also:
    • getProcessedArtifactItems

      protected List<ArtifactItem> getProcessedArtifactItems(boolean removeVersion) throws org.apache.maven.plugin.MojoExecutionException
      Parameters:
      removeVersion - removeVersion
      Returns:
      list of ArtifactItem
      Throws:
      org.apache.maven.plugin.MojoExecutionException - in case of an error
    • getMarkersDirectory

      public File getMarkersDirectory()
      Returns:
      returns the markersDirectory
    • setMarkersDirectory

      public void setMarkersDirectory(File theMarkersDirectory)
      Parameters:
      theMarkersDirectory - the markersDirectory to set
    • getExcludes

      public String getExcludes()
      Returns:
      returns a comma separated list of excluded items
    • setExcludes

      public void setExcludes(String excludes)
      Parameters:
      excludes - a comma separated list of items to exclude i.e. **\/*.xml, **\/*.properties
    • getIncludes

      public String getIncludes()
      Returns:
      returns a comma separated list of included items
    • setIncludes

      public void setIncludes(String includes)
      Parameters:
      includes - a comma separated list of items to include i.e. **\/*.xml, **\/*.properties
    • getFileMappers

      public org.codehaus.plexus.components.io.filemappers.FileMapper[] getFileMappers()
      Returns:
      FileMappers to be used for rewriting each target path, or null if no rewriting shall happen
      Since:
      3.1.2
    • setFileMappers

      public void setFileMappers(org.codehaus.plexus.components.io.filemappers.FileMapper[] fileMappers)
      Parameters:
      fileMappers - FileMappers to be used for rewriting each target path, or null if no rewriting shall happen
      Since:
      3.1.2