Class ClojureRunMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.theoryinpractise.clojure.AbstractClojureCompilerMojo
com.theoryinpractise.clojure.ClojureRunMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="run", requiresDependencyResolution=COMPILE_PLUS_RUNTIME) public class ClojureRunMojo extends AbstractClojureCompilerMojo
  • Field Details

    • script

      @Parameter(property="clojure.script") private String script
      The main clojure script to run
    • scripts

      @Parameter private String[] scripts
      Additional scripts to run
    • mainClass

      @Parameter(property="clojure.mainClass") private String mainClass
      The fully qualified name of the main class to run. This main class is intended to be one generated by :gen-class, although any Java class with a standard main() function will do.
    • args

      @Parameter(property="clojure.args") private String args
      args specified on the command line.
  • Constructor Details

    • ClojureRunMojo

      public ClojureRunMojo()
  • Method Details

    • mergeScripts

      private static String mergeScripts(String script, String[] scripts) throws org.apache.maven.plugin.MojoExecutionException
      Returns either a path to a temp file that loads all of the provided scripts, or simply returns the singular script String (which therefore allows for @ classpath-loading paths to be passed in as a script).

      If multiple scripts are defined, they must all exist; otherwise an exception is thrown.

      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException