Package org.codehaus.gmavenplus.mojo
Class AbstractGroovyMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.codehaus.gmavenplus.mojo.AbstractGroovyMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
AbstractGroovySourcesMojo,AbstractToolsMojo
public abstract class AbstractGroovyMojo extends org.apache.maven.plugin.AbstractMojoThe base mojo class, which all other mojos extend.- Since:
- 1.0-beta-1
- Author:
- Keegan Witt
-
-
Field Summary
Fields Modifier and Type Field Description protected ClassWranglerclassWranglerThe wrangler to use to work with Groovy classes, classpaths, classLoaders, and versions.protected static VersionGROOVY_1_5_0Groovy 1.5.0 version.protected static StringGROOVY_SOURCES_PATTERNThe pattern defining Groovy files.protected static VersionJAVA_1_7Java 1.7 version.protected static StringJAVA_SOURCES_PATTERNThe pattern defining Java stub files.protected VersionminGroovyVersionThe minimum version of Groovy that this mojo supports (1.5.0 by default, but other mojos can override).protected org.apache.maven.plugin.MojoExecutionmojoExecutionThe plugin's mojo execution.protected List<org.apache.maven.artifact.Artifact>pluginArtifactsThe plugin dependencies.protected org.apache.maven.project.MavenProjectprojectThe Maven project this plugin is being used on.protected org.apache.maven.execution.MavenSessionsessionThe Maven Session this plugin is being used on.protected booleanskipTestsFlag to allow test compilation to be skipped.
-
Constructor Summary
Constructors Constructor Description AbstractGroovyMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected VersiongetJavaVersion()Gets the version of Java executing this mojo as a Version object.protected StringgetJavaVersionString()Gets the version of Java executing this mojo as a String.protected booleangroovyVersionSupportsAction()Determines whether this mojo can be run with the version of Groovy supplied.protected booleanisJavaSupportIndy()Determines whether the version of Java executing this mojo supports invokedynamic (is at least 1.7).protected voidlogPluginClasspath()Logs the plugin classpath.-
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
-
-
-
Field Detail
-
GROOVY_SOURCES_PATTERN
protected static final String GROOVY_SOURCES_PATTERN
The pattern defining Groovy files.
-
JAVA_SOURCES_PATTERN
protected static final String JAVA_SOURCES_PATTERN
The pattern defining Java stub files.
-
JAVA_1_7
protected static final Version JAVA_1_7
Java 1.7 version.
-
GROOVY_1_5_0
protected static final Version GROOVY_1_5_0
Groovy 1.5.0 version.
-
classWrangler
protected ClassWrangler classWrangler
The wrangler to use to work with Groovy classes, classpaths, classLoaders, and versions.
-
project
protected org.apache.maven.project.MavenProject project
The Maven project this plugin is being used on.
-
session
protected org.apache.maven.execution.MavenSession session
The Maven Session this plugin is being used on.
-
pluginArtifacts
protected List<org.apache.maven.artifact.Artifact> pluginArtifacts
The plugin dependencies.
-
mojoExecution
protected org.apache.maven.plugin.MojoExecution mojoExecution
The plugin's mojo execution.
-
minGroovyVersion
protected Version minGroovyVersion
The minimum version of Groovy that this mojo supports (1.5.0 by default, but other mojos can override).
-
skipTests
protected boolean skipTests
Flag to allow test compilation to be skipped.
-
-
Method Detail
-
logPluginClasspath
protected void logPluginClasspath()
Logs the plugin classpath.
-
isJavaSupportIndy
protected boolean isJavaSupportIndy()
Determines whether the version of Java executing this mojo supports invokedynamic (is at least 1.7).- Returns:
trueif the running Java supports invokedynamic,falseotherwise
-
getJavaVersion
protected Version getJavaVersion()
Gets the version of Java executing this mojo as a Version object.- Returns:
- a Version object of the running Java version
-
getJavaVersionString
protected String getJavaVersionString()
Gets the version of Java executing this mojo as a String.- Returns:
- a String of the running Java version
-
groovyVersionSupportsAction
protected boolean groovyVersionSupportsAction()
Determines whether this mojo can be run with the version of Groovy supplied.- Returns:
trueonly if the version of Groovy supports this mojo.
-
-