Class UnpackMojo

  • 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
    • Field Detail

      • markersDirectory

        @Parameter(defaultValue="${project.build.directory}/dependency-maven-plugin-markers")
        private java.io.File markersDirectory
        Directory to store flag files after unpack
      • includes

        @Parameter(property="mdep.unpack.includes")
        private java.lang.String includes
        A comma separated list of file patterns to include when unpacking the artifact. i.e. **/*.xml,**/*.properties NOTE: Excludes patterns override the includes. (component code = return isIncluded( name ) AND !isExcluded( name );)
        Since:
        2.0-alpha-5
      • excludes

        @Parameter(property="mdep.unpack.excludes")
        private java.lang.String excludes
        A comma separated list of file patterns to exclude when unpacking the artifact. i.e. **\/*.xml,**\/*.properties **/*.xml,**/*.properties NOTE: Excludes patterns override the includes. (component code = return isIncluded( name ) AND !isExcluded( name );)
        Since:
        2.0-alpha-5
      • fileMappers

        @Parameter(property="mdep.unpack.filemappers")
        private org.codehaus.plexus.components.io.filemappers.FileMapper[] fileMappers
        FileMapper to be used for rewriting each target path, or null if no rewriting shall happen.
        Since:
        3.1.2
      • artifact

        @Parameter(property="artifact")
        private java.lang.String artifact
        The artifact to unpack from command line. A string of the form groupId:artifactId:version[:packaging[:classifier]]. Use AbstractFromConfigurationMojo.artifactItems within the POM configuration.
    • Constructor Detail

      • UnpackMojo

        public UnpackMojo()
    • Method Detail

      • getProcessedArtifactItems

        protected java.util.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 java.io.File getMarkersDirectory()
        Returns:
        Returns the markersDirectory.
      • setMarkersDirectory

        public void setMarkersDirectory​(java.io.File theMarkersDirectory)
        Parameters:
        theMarkersDirectory - The markersDirectory to set.
      • getExcludes

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

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

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

        public void setIncludes​(java.lang.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