Skip to content

Instantly share code, notes, and snippets.

@echeran
Last active Dec 27, 2015
Embed
What would you like to do?
mvn-lein-test - pom.xml
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<version>1</version>
<repositories>
<repository>
<id>clojars</id>
<name>Clojars</name>
<url>http://clojars.org/repo</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.clojure</groupId>
<artifactId>clojure</artifactId>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>leiningen</groupId>
<artifactId>leiningen</artifactId>
<version>2.5.3</version>
</dependency>
</dependencies>
<pluginRepositories>
<pluginRepository>
<id>clojars</id>
<name>Clojars</name>
<url>http://clojars.org/repo</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
<executions>
<execution>
<id>lein-clean</id>
<phase>clean</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>clojure.main</argument>
<argument>-m</argument>
<argument>leiningen.core.main</argument>
<argument>clean</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>lein-test</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>clojure.main</argument>
<argument>-m</argument>
<argument>leiningen.core.main</argument>
<argument>test</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>lein-compile</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>clojure.main</argument>
<argument>-m</argument>
<argument>leiningen.core.main</argument>
<argument>compile</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>pkg-lein-clean</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>clojure.main</argument>
<argument>-m</argument>
<argument>leiningen.core.main</argument>
<argument>clean</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>pkg-lein-uberjar</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>clojure.main</argument>
<argument>-m</argument>
<argument>leiningen.core.main</argument>
<argument>uberjar</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>default-jar</id>
<phase/>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.4</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment