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 GroovyDocTestsMojoCreate a GroovyDoc jar for the test sources. Note by default this will also invoke the groovydocTests goal (unless invokeGroovyDoc isfalse).- Since:
- 1.7.1
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.maven.archiver.MavenArchiveConfigurationarchiveThe archive configuration to use.protected booleanattachSpecifies whether to attach the generated artifact to the project helper.protected java.io.FiledefaultManifestFilePath to the default MANIFEST file to use.protected java.lang.StringfinalNameSpecifies the filename that will be used for the generated jar file.protected booleaninvokeGroovyDocWhether to invoke thegroovydocTestsgoal before creating jar.protected org.codehaus.plexus.archiver.jar.JarArchiverjarArchiverThe Jar archiver.protected java.lang.StringjarOutputDirectorySpecifies the directory where the generated jar file will be put.private org.apache.maven.project.MavenProjectHelperprojectHelperUsed for attaching the artifact in the project.private java.lang.StringtestArtifactTypeThe artifact type for the test GroovyDoc jar.private java.lang.StringtestClassifierThe classifier for the test GroovyDoc jar.private booleanuseDefaultManifestFileSet this totrueto enable the use of thedefaultManifestFile.-
Fields inherited from class org.codehaus.gmavenplus.mojo.GroovyDocTestsMojo
testGroovyDocJavaSources, testGroovyDocOutputDirectory, testSources
-
Fields 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, groovyDocToolClass, header, includeClasspath, linkArgumentClass, links, outputToolClass, overviewFile, resourceManagerClass, scope, skipGroovyDoc, stylesheetEncoding, stylesheetFile, windowTitle
-
Fields inherited from class org.codehaus.gmavenplus.mojo.AbstractGroovySourcesMojo
MAIN, TEST
-
Fields 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, session
-
-
Constructor Summary
Constructors Constructor Description GroovyDocTestsJarMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()Executes this mojo.protected java.io.FilegenerateArchive(java.io.File groovydocFiles, java.lang.String jarFileName)Method that creates the jar file-
Methods inherited from class org.codehaus.gmavenplus.mojo.AbstractGroovyDocMojo
copyStylesheet, createGroovyDocTool, doGroovyDocGeneration, generateGroovyDoc, setupGroovyDocSources, setupLinks, setupProperties
-
Methods inherited from class org.codehaus.gmavenplus.mojo.AbstractGroovySourcesMojo
getFiles, getFilesets, getTestFiles, getTestFilesets
-
Methods inherited from class org.codehaus.gmavenplus.mojo.AbstractGroovyMojo
getJavaVersion, getJavaVersionString, groovyAtLeast, groovyIs, groovyNewerThan, groovyOlderThan, groovyVersionSupportsAction, isGroovyIndy, isJavaSupportIndy, isJavaSupportParameters, isJavaSupportPreviewFeatures, logPluginClasspath, setupClassWrangler
-
-
-
-
Field Detail
-
finalName
@Parameter(property="project.build.finalName") protected java.lang.String 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
@Parameter(property="project.build.directory") protected java.lang.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 jarArchiverThe 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 attachSpecifies whether to attach the generated artifact to the project helper.
-
projectHelper
@Component private org.apache.maven.project.MavenProjectHelper projectHelper
Used for attaching the artifact in the project.
-
defaultManifestFile
@Parameter(defaultValue="${project.build.outputDirectory}/META-INF/MANIFEST.MF", required=true, readonly=true) protected java.io.File defaultManifestFilePath to the default MANIFEST file to use. It will be used ifuseDefaultManifestFileis set totrue.
-
useDefaultManifestFile
@Parameter(defaultValue="false") private boolean useDefaultManifestFile
Set this totrueto enable the use of thedefaultManifestFile.
-
testClassifier
@Parameter(defaultValue="test-groovydoc") private java.lang.String testClassifier
The classifier for the test GroovyDoc jar.
-
testArtifactType
@Parameter(defaultValue="javadoc") private java.lang.String testArtifactType
The artifact type for the test GroovyDoc jar.- Since:
- 1.10.0
-
invokeGroovyDoc
@Parameter(defaultValue="true") protected boolean invokeGroovyDoc
Whether to invoke thegroovydocTestsgoal before creating jar.
-
-
Method Detail
-
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 java.io.File generateArchive(java.io.File groovydocFiles, java.lang.String jarFileName) throws org.codehaus.plexus.archiver.ArchiverException, java.io.IOExceptionMethod 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 filejava.io.IOException- When an IO issue occurs preventing Maven Archiver from creating the jar file
-
-