Package scala_maven
Class ScalaSourceMojoSupport
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- scala_maven.ScalaMojoSupport
-
- scala_maven.ScalaSourceMojoSupport
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
ScalaCompilerSupport
,ScalaDocMojo
public abstract class ScalaSourceMojoSupport extends ScalaMojoSupport
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
_filterPrinted
protected java.util.Set<java.lang.String>
excludes
A list of exclusion filters for the compiler.protected java.util.Set<java.lang.String>
includes
A list of inclusion filters for the compiler.protected boolean
sendJavaToScalac
Enables/Disables sending java source to the scala compiler.-
Fields inherited from class scala_maven.ScalaMojoSupport
addJavacArgs, addScalacArgs, args, checkMultipleScalaVersions, compilerPlugins, dependencies, displayCmd, encoding, factory, failOnMultipleScalaVersions, forceUseArgFile, fork, JAR, javacArgs, javacGenerateDebugSymbols, jvmArgs, localRepo, mavenProjectBuilder, POM, project, reactorProjects, remoteRepos, resolver, SCALA_COMPILER_ARTIFACTID, SCALA_LIBRARY_ARTIFACTID, scalaClassName, session, source, target, toolchainManager, useCanonicalPath
-
-
Constructor Summary
Constructors Constructor Description ScalaSourceMojoSupport()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected java.util.List<java.io.File>
findSourceWithFilters()
Finds all source files in a set of directories with a given extension.protected java.util.List<java.io.File>
findSourceWithFilters(java.util.List<java.io.File> sourceRootDirs)
Finds all source files in a set of directories with a given extension.protected abstract java.util.List<java.io.File>
getSourceDirectories()
Retrieves the list of *all* root source directories.protected void
initFilters()
protected java.util.List<java.io.File>
normalize(java.util.List<java.lang.String> compileSourceRootsList)
This limits the source directories to only those that exist for real.-
Methods inherited from class scala_maven.ScalaMojoSupport
addCompilerPluginOptions, addCompilerToClasspath, addLibraryToClasspath, addToClasspath, addToClasspath, addToClasspath, addToClasspath, checkScalaVersion, doExecute, execute, findScalaVersion, findVersionFromDependencies, findVersionFromPluginArtifacts, getAllDependencies, getArtifactJar, getArtifactJar, getCompilerDependencies, getCompilerJar, getCompilerPluginOptions, getDependencies, getEmptyScalaCommand, getEmptyScalaCommand, getJavacOptions, getLibraryJar, getPluginArtifactJar, getPluginArtifactJar, getScalaCommand, getScalaCommand, getScalaOptions, getScalaOrganization, isJavaSupportedByCompiler, resolveArtifactDependencies, resolveDependencyArtifacts, resolveDependencyArtifacts, scalaCompilerArtifact
-
-
-
-
Field Detail
-
sendJavaToScalac
@Parameter(defaultValue="true") protected boolean sendJavaToScalac
Enables/Disables sending java source to the scala compiler.
-
includes
@Parameter protected java.util.Set<java.lang.String> includes
A list of inclusion filters for the compiler. ex :<includes> <include>SomeFile.scala</include> </includes>
-
excludes
@Parameter protected java.util.Set<java.lang.String> excludes
A list of exclusion filters for the compiler. ex :<excludes> <exclude>SomeBadFile.scala</exclude> </excludes>
-
_filterPrinted
private boolean _filterPrinted
-
-
Method Detail
-
getSourceDirectories
protected abstract java.util.List<java.io.File> getSourceDirectories() throws java.lang.Exception
Retrieves the list of *all* root source directories. We need to pass all .java and .scala files into the scala compiler- Throws:
java.lang.Exception
-
findSourceWithFilters
protected java.util.List<java.io.File> findSourceWithFilters() throws java.lang.Exception
Finds all source files in a set of directories with a given extension.- Throws:
java.lang.Exception
-
initFilters
protected void initFilters() throws java.lang.Exception
- Throws:
java.lang.Exception
-
findSourceWithFilters
protected java.util.List<java.io.File> findSourceWithFilters(java.util.List<java.io.File> sourceRootDirs) throws java.lang.Exception
Finds all source files in a set of directories with a given extension.- Throws:
java.lang.Exception
-
normalize
protected java.util.List<java.io.File> normalize(java.util.List<java.lang.String> compileSourceRootsList) throws java.lang.Exception
This limits the source directories to only those that exist for real.- Throws:
java.lang.Exception
-
-