talios / clojure-maven-plugin

Apache Maven Mojo for compiling clojure scripts to class files
252 stars 74 forks source link

Deleting of dependent files after aot compile #43

Closed vitalyper closed 1 month ago

vitalyper commented 12 years ago

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.

`

foo.bar

` 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 '_'
laurentpetit commented 9 years ago

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.