Package org.jboss.jandex.maven
Class JandexJarGoal
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.jboss.jandex.maven.JandexJarGoal
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="jandex-jar", threadSafe=true) public class JandexJarGoal extends org.apache.maven.plugin.AbstractMojoGenerate a Jandex index inside a given JAR.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.lang.String>excludesNames or glob patterns of files in the JAR that should not be indexed.private java.util.List<java.lang.String>includesNames or glob patterns of files in the JAR that should be indexed.private java.lang.StringindexNamePath to the index inside the JAR.private java.lang.IntegerindexVersionPersistent index format version to write.private java.io.FilejarThe JAR that should be indexed and inside which the index should be stored.private booleanskipSkip execution if set.private booleanuseDefaultExcludesprivate booleanverbosePrint verbose output (debug output without needing to enable -X for the whole build).
-
Constructor Summary
Constructors Constructor Description JandexJarGoal()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static voidcopy(java.io.InputStream in, java.io.OutputStream out)private java.nio.file.PathcreateTempFile(java.lang.String suffix)voidexecute()private IndexindexJar()private booleanisVerbose()
-
-
-
Field Detail
-
jar
@Parameter(required=true) private java.io.File jar
The JAR that should be indexed and inside which the index should be stored.
-
indexName
@Parameter(defaultValue="META-INF/jandex.idx") private java.lang.String indexName
Path to the index inside the JAR. Defaults toMETA-INF/jandex.idx.
-
indexVersion
@Parameter private java.lang.Integer indexVersion
Persistent index format version to write. Defaults to max supported version.
-
includes
@Parameter private java.util.List<java.lang.String> includes
Names or glob patterns of files in the JAR that should be indexed.
-
excludes
@Parameter private java.util.List<java.lang.String> excludes
Names or glob patterns of files in the JAR that should not be indexed. Excludes have priority over includes.
-
useDefaultExcludes
@Parameter(defaultValue="true") private boolean useDefaultExcludes
-
verbose
@Parameter(defaultValue="false") private boolean verbose
Print verbose output (debug output without needing to enable -X for the whole build).
-
skip
@Parameter(property="jandex.skip", defaultValue="false") private boolean skipSkip execution if set.
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
indexJar
private Index indexJar() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
createTempFile
private java.nio.file.Path createTempFile(java.lang.String suffix) throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
copy
private static void copy(java.io.InputStream in, java.io.OutputStream out) throws java.io.IOException- Throws:
java.io.IOException
-
isVerbose
private boolean isVerbose()
-
-