Class FeatureSetsDependenciesMojo

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

@Mojo(name="featuresets-dependencies", requiresProject=true, requiresDependencyResolution=COMPILE, defaultPhase=PROCESS_RESOURCES) public final class FeatureSetsDependenciesMojo extends org.apache.maven.plugin.AbstractMojo
Resolves and unpack corresponding sources of project dependencies.
  • Field Details

    • PROPERTY_PREFIX

      private static final String PROPERTY_PREFIX
      Parameters property prefix.
      See Also:
    • repoSystem

      @Component private org.eclipse.aether.RepositorySystem repoSystem
      The entry point to Aether.
    • repoSession

      @Parameter(defaultValue="${repositorySystemSession}", readonly=true) private org.eclipse.aether.RepositorySystemSession repoSession
      The current repository/network configuration of Maven.
    • remoteRepos

      @Parameter(defaultValue="${project.remoteProjectRepositories}", readonly=true) private List<org.eclipse.aether.repository.RemoteRepository> remoteRepos
      The project remote repositories to use.
    • archiverManager

      @Component private org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager
      Manager used to look up Archiver/UnArchiver implementations.
    • project

      @Parameter(defaultValue="${project}", required=true, readonly=true) private org.apache.maven.project.MavenProject project
      The maven project.
    • stageDirectory

      @Parameter(property="gfbuild.featuresets.dependencies.stageDirectory", defaultValue="${project.build.directory}/stage") private File stageDirectory
      The directory where the files will be copied.
    • copyTypes

      @Parameter(property="gfbuild.featuresets.dependencies.copyTypes", defaultValue="jar,war,rar") private String copyTypes
      Comma separated list of file extensions to include for copy.
    • copyExcludes

      @Parameter(property="gfbuild.featuresets.dependencies.copyExcludes", defaultValue="") private String copyExcludes
      Comma separated list of (g:)a(:v) to excludes for unpack.
    • unpackTypes

      @Parameter(property="gfbuild.featuresets.dependencies.unpackTypes", defaultValue="zip") private String unpackTypes
      Comma separated list of file extensions to include for unpack.
    • unpackExcludes

      @Parameter(property="gfbuild.featuresets.dependencies.unpackExcludes", defaultValue="") private String unpackExcludes
      Comma separated list of (g:)a(:v) to excludes for unpack.
    • includes

      @Parameter(property="gfbuild.featuresets.dependencies.includes", defaultValue="") private String includes
      Comma separated list of include patterns.
    • excludes

      @Parameter(property="gfbuild.featuresets.dependencies.excludes", defaultValue="") private String excludes
      Comma separated list of exclude patterns.
    • includeScope

      @Parameter(property="gfbuild.featuresets.dependencies.includeScope", defaultValue="compile", required=false) private String includeScope
      Scope to include. An Empty string indicates all scopes.
    • excludeScope

      @Parameter(property="gfbuild.featuresets.dependencies.excludeScope", defaultValue="test,system") private String excludeScope
      Scope to exclude. An Empty string indicates no scopes.
    • featureSetGroupIdIncludes

      @Parameter(property="gfbuild.featuresets.dependencies.featureset.groupid.includes", defaultValue="") private String featureSetGroupIdIncludes
      The groupId of the feature sets to include.
    • mappings

      Custom mappings.
    • skip

      @Parameter(property="gfbuild.featuresets.dependencies.skip", defaultValue="false") private boolean skip
      Skip this mojo.
  • Constructor Details

    • FeatureSetsDependenciesMojo

      public FeatureSetsDependenciesMojo()
  • Method Details

    • getMapping

      private String getMapping(org.eclipse.aether.artifact.Artifact artifact)
      Get the mapping for a given artifact. Lookup the configured mapping for a custom mapping, otherwise return the artifactId
      Parameters:
      artifact - the artifact to be mapped
      Returns:
      the mapped name for the artifact
    • stringAsList

      private static List<String> stringAsList(String str, String c)
      Convert a String to a List.
      Parameters:
      str - the String to convert
      c - the character used as separated in the String
      Returns:
      the converted List
    • isScopeIncluded

      private boolean isScopeIncluded(String scope)
      Match the given scope with the includeScope and excludeScope parameters.
      Parameters:
      scope - the scope to match
      Returns:
      true if the scope is included and not excluded, false otherwise
    • isArtifactExcluded

      private static boolean isArtifactExcluded(List<String> excludes, org.eclipse.aether.artifact.Artifact artifact)
      Match the given artifact against the exclusion list.
      Parameters:
      excludes - the exclusion list
      artifact - the artifact to match
      Returns:
      true if the artifact is included, false otherwise
    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException