clojure-maven-plugin icon indicating copy to clipboard operation
clojure-maven-plugin copied to clipboard

Deleting of dependent files after aot compile

Open vitalyper opened this issue 13 years ago • 1 comments

When clojure compiler compiles namespace with gen-class directive it recursively pulls all dependent classes. See CLJ-322

In some maven build environments such behavior could be redundant. The following configuration will delete dependent class files from outputDirecotry after clojure's AOT compile step.

<configuration> <keepNamespaces> <keepNamespace>foo.bar</keepNamespace> </keepNamespaces> </configuration> Multiple keepNamespace elements are supported and clojure's namespace mangling rules are expected:

  1. at least to parts separated by '.'
  2. last part becomes a start of class file
  3. '-' is translated into '_'

vitalyper avatar Dec 06 '11 18:12 vitalyper

For Counterclockwise's needs, I've written another flavor of this. It adds a config parameter to activate the feature, and just uses what is already configured via <namespaces/>.

I will create a PR and we can talk about the merits of one and the other and hopefully come up with something that will be integrated.

laurentpetit avatar May 15 '15 19:05 laurentpetit