Package org.eclipse.sisu.mojos
Class IndexMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.eclipse.sisu.mojos.IndexMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="index",
requiresDependencyResolution=TEST,
threadSafe=true)
public class IndexMojo
extends org.apache.maven.plugin.AbstractMojo
Generates a qualified class index for the current project and its dependencies.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.sonatype.plexus.build.incremental.BuildContext
For m2e incremental build supportprotected String
Comma separated list of ArtifactIds to exclude when indexing.protected String
Comma Separated list of Classifiers to exclude when indexing.protected String
Comma separated list of GroupIds to exclude when indexing.protected String
Scope to exclude.protected boolean
If we should exclude transitive dependencies when indexing.protected String
Comma Separated list of Types to exclude when indexing.protected String
Comma separated list of ArtifactIds to include when indexing.protected String
Comma Separated list of Classifiers to include when indexing.protected boolean
If we should include project dependencies when indexing.protected String
Comma separated list of GroupIds to include when indexing.protected String
Scope to include.protected String
Comma Separated list of Types to include when indexing.(package private) static final String
protected File
The output directory.private org.apache.maven.project.MavenProject
The Maven project to index.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
appendDirectoryToClassPath
(List<URL> urls, File directory) private void
appendFileToClassPath
(List<URL> urls, File file) private static String
private void
dumpEntries
(String name, List<URL> urls) void
execute()
private URL[]
private ClassLoader
void
setOutputDirectory
(File outputDirectory) void
setProject
(org.apache.maven.project.MavenProject project) Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
INDEX_FOLDER
- See Also:
-
outputDirectory
@Parameter(property="outputDirectory", defaultValue="${project.build.outputDirectory}") protected File outputDirectoryThe output directory. -
includeDependencies
@Parameter(property="includeDependencies", defaultValue="true") protected boolean includeDependenciesIf we should include project dependencies when indexing. -
excludeGroupIds
Comma separated list of GroupIds to exclude when indexing. -
includeGroupIds
Comma separated list of GroupIds to include when indexing. -
excludeArtifactIds
Comma separated list of ArtifactIds to exclude when indexing. -
includeArtifactIds
Comma separated list of ArtifactIds to include when indexing. -
excludeClassifiers
Comma Separated list of Classifiers to exclude when indexing. -
includeClassifiers
Comma Separated list of Classifiers to include when indexing. -
excludeTypes
Comma Separated list of Types to exclude when indexing. -
includeTypes
Comma Separated list of Types to include when indexing. -
excludeScope
Scope to exclude. Empty string indicates no scopes (default). -
includeScope
Scope to include. Empty string indicates all scopes (default). -
excludeTransitive
@Parameter(property="excludeTransitive", defaultValue="false") protected boolean excludeTransitiveIf we should exclude transitive dependencies when indexing. -
project
@Parameter(property="project", required=true, readonly=true) private org.apache.maven.project.MavenProject projectThe Maven project to index. -
buildContext
@Component protected org.sonatype.plexus.build.incremental.BuildContext buildContextFor m2e incremental build support
-
-
Constructor Details
-
IndexMojo
public IndexMojo() -
IndexMojo
public IndexMojo(org.sonatype.plexus.build.incremental.BuildContext buildContext)
-
-
Method Details
-
setProject
public void setProject(org.apache.maven.project.MavenProject project) -
setOutputDirectory
-
execute
public void execute() -
getProjectClassLoader
-
getIndexPath
-
dumpEntries
-
appendDirectoryToClassPath
-
appendFileToClassPath
- Parameters:
urls
- the list to which to append the URLfile
- must either be a directory or a JAR file
-
cleanList
-