【发布时间】:2014-03-19 14:25:35
【问题描述】:
我正在尝试使用 Maven 和 clojure-maven-plugin 将一些 Clojure 代码编译到一个 jar 中。
生成的 jar 包含源 *.clj 文件,我想从最终的 jar 中排除这些文件, 并且仅包含 AOT 编译文件。
我的pom文件如下:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<artifactId>clojure-interop</artifactId>
<groupId>com.testing.clojure</groupId>
<version>1.0.0</version>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<build>
<plugins>
<plugin>
<groupId>com.theoryinpractise</groupId>
<artifactId>clojure-maven-plugin</artifactId>
<version>1.3.13</version>
<extensions>true</extensions>
<executions>
<execution>
<id>compile-clojure</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>test-clojure</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>clojars</id>
<url>http://clojars.org/repo/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.clojure</groupId>
<artifactId>clojure</artifactId>
<version>1.5.0</version>
</dependency>
</dependencies>
</project>
有人能指出正确的方向吗?
【问题讨论】: