Package org.codehaus.gmavenplus.mojo
Class GroovyDocTestsJarMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.gmavenplus.mojo.AbstractGroovyMojo
org.codehaus.gmavenplus.mojo.AbstractGroovySourcesMojo
org.codehaus.gmavenplus.mojo.AbstractGroovyDocMojo
org.codehaus.gmavenplus.mojo.GroovyDocTestsMojo
org.codehaus.gmavenplus.mojo.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 Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.maven.archiver.MavenArchiveConfigurationThe archive configuration to use.protected booleanSpecifies whether to attach the generated artifact to the project helper.protected FilePath to the default MANIFEST file to use.protected StringSpecifies the filename that will be used for the generated jar file.protected booleanWhether to invoke thegroovydocTestsgoal before creating jar.protected org.codehaus.plexus.archiver.jar.JarArchiverThe Jar archiver.protected StringSpecifies the directory where the generated jar file will be put.Fields inherited from class org.codehaus.gmavenplus.mojo.GroovyDocTestsMojo
testGroovyDocJavaSources, testGroovyDocOutputDirectory, testSourcesFields inherited from class org.codehaus.gmavenplus.mojo.AbstractGroovyDocMojo
attachGroovyDocAnnotation, classpathResourceManagerClass, defaultClassTemplates, defaultDocTemplates, defaultPackageTemplates, displayAuthor, docTitle, fileOutputToolClass, footer, GROOVY_1_5_2, GROOVY_1_5_8, GROOVY_1_6_0_RC1, GROOVY_1_6_0_RC2, GROOVY_3_0_0_ALPHA_4, GROOVY_4_0_27, GROOVY_5_0_0_ALPHA_1, GROOVY_5_0_0_BETA_1, groovyDocToolClass, header, includeClasspath, languageLevel, linkArgumentClass, links, outputToolClass, overviewFile, resourceManagerClass, scope, skipGroovyDoc, stylesheetEncoding, stylesheetFile, windowTitleFields inherited from class org.codehaus.gmavenplus.mojo.AbstractGroovySourcesMojo
MAIN, TESTFields inherited from class org.codehaus.gmavenplus.mojo.AbstractGroovyMojo
classWrangler, GROOVY_1_5_0, GROOVY_SOURCES_PATTERN, JAVA_1_7, JAVA_1_8, JAVA_12, JAVA_SOURCES_PATTERN, minGroovyVersion, mojoExecution, pluginArtifacts, project, sessionFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Executes this mojo.protected FilegenerateArchive(File groovydocFiles, String jarFileName) Method that creates the jar fileMethods inherited from class org.codehaus.gmavenplus.mojo.AbstractGroovyDocMojo
copyStylesheet, createGroovyDocTool, doGroovyDocGeneration, generateGroovyDoc, setupGroovyDocSources, setupLinks, setupPropertiesMethods inherited from class org.codehaus.gmavenplus.mojo.AbstractGroovySourcesMojo
getFiles, getFilesets, getTestFiles, getTestFilesetsMethods inherited from class org.codehaus.gmavenplus.mojo.AbstractGroovyMojo
getJavaVersion, getJavaVersionString, groovyAtLeast, groovyIs, groovyNewerThan, groovyOlderThan, groovyVersionSupportsAction, isGroovyIndy, isJavaSupportIndy, isJavaSupportParameters, isJavaSupportPreviewFeatures, logPluginClasspath, setupClassWranglerMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
finalName
Specifies the filename that will be used for the generated jar file. Please note that-test-groovydocwill be appended to the file name. -
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 jarArchiverThe Jar archiver. -
archive
@Parameter protected final org.apache.maven.archiver.MavenArchiveConfiguration archiveThe archive configuration to use. See Maven Archiver Reference. -
attach
@Parameter(property="attach", defaultValue="true") protected boolean attachSpecifies 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 defaultManifestFilePath to the default MANIFEST file to use. It will be used ifuseDefaultManifestFileis set totrue. -
invokeGroovyDoc
@Parameter(defaultValue="true") protected boolean invokeGroovyDocWhether to invoke thegroovydocTestsgoal before creating jar.
-
-
Constructor Details
-
GroovyDocTestsJarMojo
public GroovyDocTestsJarMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionExceptionExecutes this mojo.- Specified by:
executein interfaceorg.apache.maven.plugin.Mojo- Overrides:
executein classGroovyDocTestsMojo- 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 putjarFileName- 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 fileIOException- When an IO issue occurs preventing Maven Archiver from creating the jar file
-