pallet/clojure-maven — pull request #4 by fernandod (2012-03-12 04:17:04+00:00)
Title: New defmojo macro. Syntactic sugar for defining mojos in clojure

Hugo: here's defmojo again. What I've done:

* put defmojo under the new `mojo` artifact
* Write function `keywords->java-annotations`, instead of hardcoded map
* Use `vary-meta`
* Assume body is the body of the execute function
* and also wrap it in `with-log`
* Update example comment and move it to the documentation of `defmojo` definition
* Group mojo parameters in a vector (I thought this was cleaner and also simplified the impl)
* Add validations for better error handling
* Write basic unit tests
* Formatting max 80 columns (the hardest item by far #-), no kidding!)

Additional notes:

* The pom currently don't run unit tests. How can be achieve that? (Could you use zi? Would that be a cyclic dependency?). I use a lein project.clj locally for development.
* Can we think of ways to minimize the number of artifacts that Mojo writers have to depend on?
* Please do send me your feedback. I'm pretty new to Clojure. Writing defmojo was very educational.

Thanks again,
Ferd