Created
September 15, 2012 08:58
-
-
Save stuartgunter/3727047 to your computer and use it in GitHub Desktop.
Execute Clojure script in Maven
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns cljmvn) | |
(println (str "Hello " (first *command-line-args*))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>com.theoryinpractise</groupId> | |
<artifactId>clojure-maven-plugin</artifactId> | |
<version>1.3.11</version> | |
<executions> | |
<execution> | |
<id>exec-clojure-script</id> | |
<phase>validate</phase> | |
<goals> | |
<goal>run</goal> | |
</goals> | |
<configuration> | |
<script>src/build/scripts/cljmvn.clj</script> | |
<args>Stuart</args> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>exec-maven-plugin</artifactId> | |
<version>1.2.1</version> | |
<executions> | |
<execution> | |
<id>exec-clojure-script</id> | |
<phase>validate</phase> | |
<goals> | |
<goal>java</goal> | |
</goals> | |
<configuration> | |
<arguments> | |
<!-- the script to import --> | |
<argument>src/build/scripts/cljmvn.clj</argument> | |
<!-- script args --> | |
<argument>Stuart</argument> | |
</arguments> | |
<mainClass>clojure.main</mainClass> | |
<includePluginDependencies>true</includePluginDependencies> | |
</configuration> | |
</execution> | |
</executions> | |
<dependencies> | |
<dependency> | |
<groupId>org.clojure</groupId> | |
<artifactId>clojure</artifactId> | |
<version>${clojure.version}</version> | |
</dependency> | |
</dependencies> | |
</plugin> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment