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.AbstractMojo
Generate a Jandex index inside a given JAR.
  • Field Details

    • jar

      @Parameter(required=true) private File jar
      The JAR that should be indexed and inside which the index should be stored.
    • indexName

      @Parameter(defaultValue="META-INF/jandex.idx") private String indexName
      Path to the index inside the JAR. Defaults to META-INF/jandex.idx.
    • indexVersion

      @Parameter private Integer indexVersion
      Persistent index format version to write. Defaults to max supported version.
    • includes

      @Parameter private List<String> includes
      Names or glob patterns of files in the JAR that should be indexed.
    • excludes

      @Parameter private List<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 skip
      Skip execution if set.
  • Constructor Details

    • JandexJarGoal

      public JandexJarGoal()
  • Method Details

    • 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 Path createTempFile(String suffix) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • copy

      private static void copy(InputStream in, OutputStream out) throws IOException
      Throws:
      IOException
    • isVerbose

      private boolean isVerbose()