Package org.codehaus.gmavenplus.mojo
Class AbstractGroovySourcesMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.codehaus.gmavenplus.mojo.AbstractGroovyMojo
-
- org.codehaus.gmavenplus.mojo.AbstractGroovySourcesMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
AbstractCompileMojo
,AbstractGroovydocMojo
,AbstractGroovyStubSourcesMojo
,AddSourcesMojo
,AddTestSourcesMojo
public abstract class AbstractGroovySourcesMojo extends AbstractGroovyMojo
This mojo provides access to the Groovy sources.- Since:
- 1.0-beta-2
- Author:
- Keegan Witt
-
-
Field Summary
Fields Modifier and Type Field Description static String
MAIN
Main source directory name.protected org.apache.maven.shared.model.fileset.FileSet[]
sources
The Groovy source files (relative paths).static String
TEST
Test source directory name.protected org.apache.maven.shared.model.fileset.FileSet[]
testSources
The Groovy test source files (relative paths).-
Fields inherited from class org.codehaus.gmavenplus.mojo.AbstractGroovyMojo
classWrangler, GROOVY_1_5_0, GROOVY_SOURCES_PATTERN, JAVA_1_7, JAVA_SOURCES_PATTERN, minGroovyVersion, mojoExecution, pluginArtifacts, project, session, skipTests
-
-
Constructor Summary
Constructors Constructor Description AbstractGroovySourcesMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Set<File>
getFiles(org.apache.maven.shared.model.fileset.FileSet[] fromSources, String defaultSourceDirectory, boolean includeJavaSources)
Gets the set of included files from the specified source files or source directory (if sources are null).protected org.apache.maven.shared.model.fileset.FileSet[]
getFilesets(org.apache.maven.shared.model.fileset.FileSet[] fromSources, String defaultSubDirectory, boolean includeJavaSources)
Gets the set of included filesets from the specified source files or source directory (if sources are null).protected org.apache.maven.shared.model.fileset.FileSet[]
getSourceRoots()
Gets the filesets of the the main sources (not including Java sources).protected org.apache.maven.shared.model.fileset.FileSet[]
getSourceRoots(boolean includeJavaSources)
Gets the filesets of the the main sources.protected Set<File>
getSources()
Gets the set of files of the the main sources (not including Java sources).protected Set<File>
getSources(boolean includeJavaSources)
Gets the set of files of the the main sources.protected org.apache.maven.shared.model.fileset.FileSet[]
getTestSourceRoots()
Gets the filesets of the test sources (not including Java sources).protected org.apache.maven.shared.model.fileset.FileSet[]
getTestSourceRoots(boolean includeJavaSources)
Gets the filesets of the test sources.protected Set<File>
getTestSources()
Gets the set of files of the test sources (not including Java sources).protected Set<File>
getTestSources(boolean includeJavaSources)
Gets the set of files of the test sources.void
setSources(org.apache.maven.shared.model.fileset.FileSet[] newSources)
Sets the sources to specified.void
setTestSources(org.apache.maven.shared.model.fileset.FileSet[] newTestSources)
Sets the test sources to specified.-
Methods inherited from class org.codehaus.gmavenplus.mojo.AbstractGroovyMojo
getJavaVersion, getJavaVersionString, groovyVersionSupportsAction, isJavaSupportIndy, logPluginClasspath
-
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
-
-
-
Field Detail
-
MAIN
public static final String MAIN
Main source directory name.- See Also:
- Constant Field Values
-
TEST
public static final String TEST
Test source directory name.- See Also:
- Constant Field Values
-
sources
protected org.apache.maven.shared.model.fileset.FileSet[] sources
The Groovy source files (relative paths). Default: "${project.basedir}/src/main/groovy/**/*.groovy"
-
testSources
protected org.apache.maven.shared.model.fileset.FileSet[] testSources
The Groovy test source files (relative paths). Default: "${project.basedir}/src/test/groovy/**/*.groovy"
-
-
Method Detail
-
getSourceRoots
protected org.apache.maven.shared.model.fileset.FileSet[] getSourceRoots(boolean includeJavaSources)
Gets the filesets of the the main sources.- Parameters:
includeJavaSources
- Whether to include Java sources- Returns:
- The filesets of the the main sources.
-
getSourceRoots
protected org.apache.maven.shared.model.fileset.FileSet[] getSourceRoots()
Gets the filesets of the the main sources (not including Java sources).- Returns:
- The filesets of the the main sources.
-
getSources
protected Set<File> getSources(boolean includeJavaSources)
Gets the set of files of the the main sources.- Parameters:
includeJavaSources
- Whether to include Java sources- Returns:
- The set of files of the the main sources.
-
getSources
protected Set<File> getSources()
Gets the set of files of the the main sources (not including Java sources).- Returns:
- The set of files of the the main sources.
-
getTestSourceRoots
protected org.apache.maven.shared.model.fileset.FileSet[] getTestSourceRoots(boolean includeJavaSources)
Gets the filesets of the test sources.- Parameters:
includeJavaSources
- Whether to include Java sources- Returns:
- The filesets of the test sources.
-
getTestSourceRoots
protected org.apache.maven.shared.model.fileset.FileSet[] getTestSourceRoots()
Gets the filesets of the test sources (not including Java sources).- Returns:
- The filesets of the test sources.
-
getTestSources
protected Set<File> getTestSources(boolean includeJavaSources)
Gets the set of files of the test sources.- Parameters:
includeJavaSources
- Whether to include Java sources- Returns:
- The set of files of the test sources.
-
getTestSources
protected Set<File> getTestSources()
Gets the set of files of the test sources (not including Java sources).- Returns:
- The set of files of the test sources.
-
getFiles
protected Set<File> getFiles(org.apache.maven.shared.model.fileset.FileSet[] fromSources, String defaultSourceDirectory, boolean includeJavaSources)
Gets the set of included files from the specified source files or source directory (if sources are null).- Parameters:
fromSources
- The sources to get the included files fromdefaultSourceDirectory
- The source directory to fall back on if sources are nullincludeJavaSources
- Whether to include Java sources- Returns:
- The included files from the specified sources
-
getFilesets
protected org.apache.maven.shared.model.fileset.FileSet[] getFilesets(org.apache.maven.shared.model.fileset.FileSet[] fromSources, String defaultSubDirectory, boolean includeJavaSources)
Gets the set of included filesets from the specified source files or source directory (if sources are null).- Parameters:
fromSources
- The sources to get the included files fromdefaultSubDirectory
- The source subdirectory to fall back on if sources are nullincludeJavaSources
- Whether to include Java sources- Returns:
- The included filesets from the specified sources
-
setSources
public void setSources(org.apache.maven.shared.model.fileset.FileSet[] newSources)
Sets the sources to specified.- Parameters:
newSources
- the sources to set
-
setTestSources
public void setTestSources(org.apache.maven.shared.model.fileset.FileSet[] newTestSources)
Sets the test sources to specified.- Parameters:
newTestSources
- the test sources to set
-
-