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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classConfiguration of dependency mapping to name. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.codehaus.plexus.archiver.manager.ArchiverManagerManager used to look up Archiver/UnArchiver implementations.private StringComma separated list of (g:)a(:v) to excludes for unpack.private StringComma separated list of file extensions to include for copy.private StringComma separated list of exclude patterns.private StringScope to exclude.private StringThe groupId of the feature sets to include.private StringComma separated list of include patterns.private StringScope to include.Custom mappings.private org.apache.maven.project.MavenProjectThe maven project.private static final StringParameters property prefix.private List<org.eclipse.aether.repository.RemoteRepository> The project remote repositories to use.private org.eclipse.aether.RepositorySystemSessionThe current repository/network configuration of Maven.private org.eclipse.aether.RepositorySystemThe entry point to Aether.private booleanSkip this mojo.private FileThe directory where the files will be copied.private StringComma separated list of (g:)a(:v) to excludes for unpack.private StringComma separated list of file extensions to include for unpack.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()private StringgetMapping(org.eclipse.aether.artifact.Artifact artifact) Get the mapping for a given artifact.private static booleanisArtifactExcluded(List<String> excludes, org.eclipse.aether.artifact.Artifact artifact) Match the given artifact against the exclusion list.private booleanisScopeIncluded(String scope) Match the given scope with the includeScope and excludeScope parameters.stringAsList(String str, String c) Convert aStringto aList.Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
PROPERTY_PREFIX
-
repoSystem
@Component private org.eclipse.aether.RepositorySystem repoSystemThe entry point to Aether. -
repoSession
@Parameter(defaultValue="${repositorySystemSession}", readonly=true) private org.eclipse.aether.RepositorySystemSession repoSessionThe current repository/network configuration of Maven. -
remoteRepos
@Parameter(defaultValue="${project.remoteProjectRepositories}", readonly=true) private List<org.eclipse.aether.repository.RemoteRepository> remoteReposThe project remote repositories to use. -
archiverManager
@Component private org.codehaus.plexus.archiver.manager.ArchiverManager archiverManagerManager used to look up Archiver/UnArchiver implementations. -
project
@Parameter(defaultValue="${project}", required=true, readonly=true) private org.apache.maven.project.MavenProject projectThe maven project. -
stageDirectory
@Parameter(property="gfbuild.featuresets.dependencies.stageDirectory", defaultValue="${project.build.directory}/stage") private File stageDirectoryThe directory where the files will be copied. -
copyTypes
@Parameter(property="gfbuild.featuresets.dependencies.copyTypes", defaultValue="jar,war,rar") private String copyTypesComma separated list of file extensions to include for copy. -
copyExcludes
@Parameter(property="gfbuild.featuresets.dependencies.copyExcludes", defaultValue="") private String copyExcludesComma separated list of (g:)a(:v) to excludes for unpack. -
unpackTypes
@Parameter(property="gfbuild.featuresets.dependencies.unpackTypes", defaultValue="zip") private String unpackTypesComma separated list of file extensions to include for unpack. -
unpackExcludes
@Parameter(property="gfbuild.featuresets.dependencies.unpackExcludes", defaultValue="") private String unpackExcludesComma separated list of (g:)a(:v) to excludes for unpack. -
includes
@Parameter(property="gfbuild.featuresets.dependencies.includes", defaultValue="") private String includesComma separated list of include patterns. -
excludes
@Parameter(property="gfbuild.featuresets.dependencies.excludes", defaultValue="") private String excludesComma separated list of exclude patterns. -
includeScope
@Parameter(property="gfbuild.featuresets.dependencies.includeScope", defaultValue="compile", required=false) private String includeScopeScope to include. An Empty string indicates all scopes. -
excludeScope
@Parameter(property="gfbuild.featuresets.dependencies.excludeScope", defaultValue="test,system") private String excludeScopeScope to exclude. An Empty string indicates no scopes. -
featureSetGroupIdIncludes
@Parameter(property="gfbuild.featuresets.dependencies.featureset.groupid.includes", defaultValue="") private String featureSetGroupIdIncludesThe groupId of the feature sets to include. -
mappings
Custom mappings. -
skip
@Parameter(property="gfbuild.featuresets.dependencies.skip", defaultValue="false") private boolean skipSkip this mojo.
-
-
Constructor Details
-
FeatureSetsDependenciesMojo
public FeatureSetsDependenciesMojo()
-
-
Method Details
-
getMapping
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
-
isScopeIncluded
Match the given scope with the includeScope and excludeScope parameters.- Parameters:
scope- the scope to match- Returns:
trueif the scope is included and not excluded,falseotherwise
-
isArtifactExcluded
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-