Class GroovyDocTestsJarMojo

All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="groovydocTests-jar", defaultPhase=PACKAGE, requiresDependencyResolution=TEST, threadSafe=true) public class GroovyDocTestsJarMojo extends GroovyDocTestsMojo
Create a GroovyDoc jar for the test sources. Note by default this will also invoke the groovydocTests goal (unless invokeGroovyDoc is false).
Since:
1.7.1
Author:
Keegan Witt
  • Field Details

    • finalName

      @Parameter(property="project.build.finalName") protected String finalName
      Specifies the filename that will be used for the generated jar file. Please note that -test-groovydoc will be appended to the file name.
    • jarOutputDirectory

      @Parameter(property="project.build.directory") protected String jarOutputDirectory
      Specifies the directory where the generated jar file will be put.
    • jarArchiver

      @Component(role=org.codehaus.plexus.archiver.Archiver.class, hint="jar") protected org.codehaus.plexus.archiver.jar.JarArchiver jarArchiver
      The Jar archiver.
    • archive

      @Parameter protected final org.apache.maven.archiver.MavenArchiveConfiguration archive
      The archive configuration to use. See Maven Archiver Reference.
    • attach

      @Parameter(property="attach", defaultValue="true") protected boolean attach
      Specifies whether to attach the generated artifact to the project helper.
    • defaultManifestFile

      @Parameter(defaultValue="${project.build.outputDirectory}/META-INF/MANIFEST.MF", required=true, readonly=true) protected File defaultManifestFile
      Path to the default MANIFEST file to use. It will be used if useDefaultManifestFile is set to true.
    • invokeGroovyDoc

      @Parameter(defaultValue="true") protected boolean invokeGroovyDoc
      Whether to invoke the groovydocTests goal before creating jar.
  • Constructor Details

    • GroovyDocTestsJarMojo

      public GroovyDocTestsJarMojo()
  • Method Details

    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException
      Executes this mojo.
      Specified by:
      execute in interface org.apache.maven.plugin.Mojo
      Overrides:
      execute in class GroovyDocTestsMojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException - If an unexpected problem occurs (causes a "BUILD ERROR" message to be displayed)
    • generateArchive

      protected File generateArchive(File groovydocFiles, String jarFileName) throws org.codehaus.plexus.archiver.ArchiverException, IOException
      Method that creates the jar file
      Parameters:
      groovydocFiles - the directory where the generated jar file will be put
      jarFileName - the filename of the generated jar file
      Returns:
      a File object that contains the generated jar file
      Throws:
      org.codehaus.plexus.archiver.ArchiverException - When an issue occurs preventing Maven Archiver from creating the jar file
      IOException - When an IO issue occurs preventing Maven Archiver from creating the jar file