Class 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 Detail

      • script

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

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

        @Parameter(property="clojure.mainClass")
        private java.lang.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 java.lang.String args
        args specified on the command line.
    • Constructor Detail

      • ClojureRunMojo

        public ClojureRunMojo()
    • Method Detail

      • mergeScripts

        private static java.lang.String mergeScripts​(java.lang.String script,
                                                     java.lang.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