|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.maven.plugin.AbstractMojo
org.scala_tools.maven.ScalaCompilerSupport
org.scala_tools.maven.ScalaContinuousCompileMojo
public class ScalaContinuousCompileMojo
Compile the main and test scala source directory in continuous (infinite loop). !! This is an util goal for commandline usage only (Do not use or call it in a pom) !!!
Field Summary | |
---|---|
protected String[] |
args
compiler additionnals arguments |
protected boolean |
checkMultipleScalaVersions
Check if every dependencies use the same version of scala-library. |
protected BasicArtifact[] |
compilerPlugins
Compiler plugin dependencies to use when compiling. |
protected BasicArtifact[] |
dependencies
Additional dependencies/jar to add to classpath to run "scalaClassName" (scope and optional field not supported) ex : <dependencies> <dependency> <groupId>org.scala-tools</groupId> <artifactId>scala-compiler-addon</artifactId> <version>1.0-SNAPSHOT</version> </dependency> </dependencies> |
protected boolean |
displayCmd
Display the command line called ? |
protected org.apache.maven.artifact.factory.ArtifactFactory |
factory
Used to look up Artifacts in the remote repository. |
protected boolean |
failOnMultipleScalaVersions
Determines if a detection of multiple scala versions in the dependencies will cause the build to fail. |
protected boolean |
forceUseArgFile
Force the use of an external ArgFile to run any forked process. |
protected boolean |
fork
Forks the execution of scalac into a separate process. |
protected String[] |
jvmArgs
Jvm Arguments. |
protected org.apache.maven.artifact.repository.ArtifactRepository |
localRepo
Location of the local repository. |
protected File |
mainOutputDir
|
protected File |
mainSourceDir
|
protected org.apache.maven.project.MavenProjectBuilder |
mavenProjectBuilder
Artifact factory, needed to download source jars. |
protected boolean |
once
Define if cc should run once or in infinite loop. |
protected org.apache.maven.project.MavenProject |
project
|
protected List<?> |
remoteRepos
List of Remote Repositories used by the resolver |
protected org.apache.maven.artifact.resolver.ArtifactResolver |
resolver
Used to look up Artifacts in the remote repository. |
static String |
SCALA_GROUPID
|
static String |
SCALA_LIBRARY_ARTIFACTID
|
protected String |
scalaClassName
className (FQN) of the scala tool to provide as |
protected String |
scalaVersion
Scala 's version to use |
protected File |
testOutputDir
|
protected File |
testSourceDir
|
protected boolean |
useFsc
Define if fsc should be used, else scalac is used. |
protected boolean |
verbose
|
Fields inherited from class org.scala_tools.maven.ScalaCompilerSupport |
---|
loopSleep, sendJavaToScalac |
Fields inherited from interface org.apache.maven.plugin.Mojo |
---|
ROLE |
Constructor Summary | |
---|---|
ScalaContinuousCompileMojo()
|
Method Summary | |
---|---|
protected void |
addToClasspath(org.apache.maven.artifact.Artifact artifact,
Set<String> classpath)
|
protected void |
addToClasspath(String groupId,
String artifactId,
String version,
Set<String> classpath)
|
protected void |
checkScalaVersion()
|
protected void |
doExecute()
|
void |
execute()
|
protected List<String> |
getClasspathElements()
|
protected List<org.apache.maven.model.Dependency> |
getDependencies()
|
protected JavaMainCaller |
getEmptyScalaCommand(String mainClass)
|
protected File |
getOutputDir()
|
protected JavaMainCaller |
getScalaCommand()
|
protected List<String> |
getSourceDirectories()
Retreives the list of *all* root source directories. |
protected boolean |
isJavaSupportedByCompiler()
|
protected Set<org.apache.maven.artifact.Artifact> |
resolveArtifactDependencies(org.apache.maven.artifact.Artifact artifact)
This method resolves all transitive dependencies of an artifact. |
protected Set<org.apache.maven.artifact.Artifact> |
resolveDependencyArtifacts(org.apache.maven.project.MavenProject theProject)
This method resolves the dependency artifacts from the project. |
Methods inherited from class org.scala_tools.maven.ScalaCompilerSupport |
---|
compile, compile, normalize |
Methods inherited from class org.apache.maven.plugin.AbstractMojo |
---|
getLog, getPluginContext, setLog, setPluginContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected File mainOutputDir
protected File mainSourceDir
protected File testOutputDir
protected File testSourceDir
protected boolean useFsc
protected boolean once
protected boolean verbose
public static final String SCALA_GROUPID
public static final String SCALA_LIBRARY_ARTIFACTID
protected org.apache.maven.project.MavenProject project
protected org.apache.maven.artifact.factory.ArtifactFactory factory
protected org.apache.maven.artifact.resolver.ArtifactResolver resolver
protected org.apache.maven.artifact.repository.ArtifactRepository localRepo
protected List<?> remoteRepos
protected BasicArtifact[] dependencies
protected BasicArtifact[] compilerPlugins
protected String[] jvmArgs
protected String[] args
protected String scalaClassName
protected String scalaVersion
protected boolean displayCmd
protected boolean fork
protected boolean forceUseArgFile
protected boolean checkMultipleScalaVersions
protected boolean failOnMultipleScalaVersions
protected org.apache.maven.project.MavenProjectBuilder mavenProjectBuilder
Constructor Detail |
---|
public ScalaContinuousCompileMojo()
Method Detail |
---|
protected List<String> getClasspathElements() throws Exception
getClasspathElements
in class ScalaCompilerSupport
Exception
protected File getOutputDir() throws Exception
getOutputDir
in class ScalaCompilerSupport
Exception
protected List<String> getSourceDirectories() throws Exception
ScalaCompilerSupport
getSourceDirectories
in class ScalaCompilerSupport
Exception
protected JavaMainCaller getScalaCommand() throws Exception
Exception
protected final void doExecute() throws Exception
doExecute
in class ScalaCompilerSupport
Exception
protected Set<org.apache.maven.artifact.Artifact> resolveDependencyArtifacts(org.apache.maven.project.MavenProject theProject) throws Exception
theProject
- The POM.
org.apache.maven.artifact.resolver.ArtifactResolutionException
org.apache.maven.artifact.resolver.ArtifactNotFoundException
org.apache.maven.project.artifact.InvalidDependencyVersionException
Exception
protected Set<org.apache.maven.artifact.Artifact> resolveArtifactDependencies(org.apache.maven.artifact.Artifact artifact) throws Exception
artifact
- the artifact used to retrieve dependencies
org.apache.maven.artifact.resolver.ArtifactResolutionException
org.apache.maven.artifact.resolver.ArtifactNotFoundException
org.apache.maven.project.ProjectBuildingException
org.apache.maven.project.artifact.InvalidDependencyVersionException
Exception
protected void addToClasspath(String groupId, String artifactId, String version, Set<String> classpath) throws Exception
Exception
protected void addToClasspath(org.apache.maven.artifact.Artifact artifact, Set<String> classpath) throws Exception
Exception
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
protected List<org.apache.maven.model.Dependency> getDependencies()
protected void checkScalaVersion() throws Exception
Exception
protected JavaMainCaller getEmptyScalaCommand(String mainClass) throws Exception
Exception
protected boolean isJavaSupportedByCompiler()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |