com.theoryinpractise.clojure
Class AbstractClojureCompilerMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by com.theoryinpractise.clojure.AbstractClojureCompilerMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
ClojureCompilerMojo, ClojureGenDocMojo, ClojureNailgunMojo, ClojureReplMojo, ClojureRunMojo, ClojureRunTestMojo, ClojureSwankMojo, TestClojureCompilerMojo

public abstract class AbstractClojureCompilerMojo
extends org.apache.maven.plugin.AbstractMojo


Nested Class Summary
static class AbstractClojureCompilerMojo.SourceDirectory
           
 
Field Summary
protected  File baseDirectory
          Base directory of the project.
protected  File baseTestSourceDirectory
          Location of the source files.
protected  List<String> classpathElements
          Project classpath.
protected  boolean compileDeclaredNamespaceOnly
          Should we compile all namespaces or only those defined?
protected  String[] copiedNamespaces
          A list of namespaces whose source files will be copied to the output.
protected  boolean copyDeclaredNamespaceOnly
          Should we copy the source of all namespaces or only those defined?
protected  File generatedSourceDirectory
          Location of the generated source files.
protected  String[] namespaces
          A list of namespaces to compile
protected  File outputDirectory
          Location of the file.
protected  List<String> testClasspathElements
          Project test classpath.
protected  boolean testDeclaredNamespaceOnly
          Should we test all namespaces or only those defined?
protected  String[] testNamespaces
          A list of test namespaces to compile
protected  File testOutputDirectory
          Location of the file.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractClojureCompilerMojo()
           
 
Method Summary
protected  void callClojureWith(File[] sourceDirectory, File outputDirectory, List<String> compileClasspathElements, String mainClass, NamespaceInFile[] namespaceArgs)
           
protected  void callClojureWith(File[] sourceDirectory, File outputDirectory, List<String> compileClasspathElements, String mainClass, String[] clojureArgs)
           
protected  void copyNamespaceSourceFilesToOutput(File outputDirectory, NamespaceInFile[] discoveredNamespaces)
           
protected  NamespaceInFile[] discoverNamespaces()
           
protected  NamespaceInFile[] discoverNamespacesToCopy()
           
 List<String> getRunWithClasspathElements()
           
 File[] getSourceDirectories(AbstractClojureCompilerMojo.SourceDirectory... sourceDirectoryTypes)
           
 
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
 
Methods inherited from interface org.apache.maven.plugin.Mojo
execute
 

Field Detail

baseDirectory

protected File baseDirectory
Base directory of the project.


classpathElements

protected List<String> classpathElements
Project classpath.


testClasspathElements

protected List<String> testClasspathElements
Project test classpath.


outputDirectory

protected File outputDirectory
Location of the file.


testOutputDirectory

protected File testOutputDirectory
Location of the file.


baseTestSourceDirectory

protected File baseTestSourceDirectory
Location of the source files.


generatedSourceDirectory

protected File generatedSourceDirectory
Location of the generated source files.


compileDeclaredNamespaceOnly

protected boolean compileDeclaredNamespaceOnly
Should we compile all namespaces or only those defined?


namespaces

protected String[] namespaces
A list of namespaces to compile


testDeclaredNamespaceOnly

protected boolean testDeclaredNamespaceOnly
Should we test all namespaces or only those defined?


testNamespaces

protected String[] testNamespaces
A list of test namespaces to compile


copiedNamespaces

protected String[] copiedNamespaces
A list of namespaces whose source files will be copied to the output.


copyDeclaredNamespaceOnly

protected boolean copyDeclaredNamespaceOnly
Should we copy the source of all namespaces or only those defined?

Constructor Detail

AbstractClojureCompilerMojo

public AbstractClojureCompilerMojo()
Method Detail

discoverNamespaces

protected NamespaceInFile[] discoverNamespaces()
                                        throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

discoverNamespacesToCopy

protected NamespaceInFile[] discoverNamespacesToCopy()
                                              throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

getSourceDirectories

public File[] getSourceDirectories(AbstractClojureCompilerMojo.SourceDirectory... sourceDirectoryTypes)

getRunWithClasspathElements

public List<String> getRunWithClasspathElements()

copyNamespaceSourceFilesToOutput

protected void copyNamespaceSourceFilesToOutput(File outputDirectory,
                                                NamespaceInFile[] discoveredNamespaces)
                                         throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

callClojureWith

protected void callClojureWith(File[] sourceDirectory,
                               File outputDirectory,
                               List<String> compileClasspathElements,
                               String mainClass,
                               NamespaceInFile[] namespaceArgs)
                        throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

callClojureWith

protected void callClojureWith(File[] sourceDirectory,
                               File outputDirectory,
                               List<String> compileClasspathElements,
                               String mainClass,
                               String[] clojureArgs)
                        throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException


Copyright © 2011. All Rights Reserved.