Closed semperos closed 8 years ago
Haven't touched or looked at this in a long time, closing.
My bad - I didn't even SEE this ticket :( c-m-p is largely idle these days, unless someone shouts at me loudly.
Absolutely no problem. I was finally doing some cleaning up of issues and PR's I've opened across Github projects. Thanks for your contributions to the Clojure community, they're much appreciated.
The clojure-maven-plugin behaves differently from other plugins that allow adding source paths, even including clojure-maven-plugin's own
ClojureAddSourceMojo
.In the
translatePaths
method of theAbstractClojureCompilerMojo
class, you manually prependbaseDirectory
onto the values captured insourceDirectories
, whereas the proper way seems to be calling.getAbsolutePath
onFile
objects likeClojureAddSourceMojo
does. Here are the two code examples:https://github.com/talios/clojure-maven-plugin/blob/develop/src/main/java/com/theoryinpractise/clojure/AbstractClojureCompilerMojo.java#L231
https://github.com/talios/clojure-maven-plugin/blob/develop/src/main/java/com/theoryinpractise/clojure/ClojureAddSourceMojo.java#L15
For example, I am putting some generated Clojure code into
<project>/target/src/main/clojure
of my project, but if I try to configure clojure-maven-plugin'ssourceDirectories -> sourceDirectory
with${project.build.directory}/src/main/clojure}
, clojure-maven-plugin doesn't find my source files, whereas the equivalent configuration works fine for both the maven-build-helper-plugin and the jruby-maven-plugin, both of which take the.getAbsolutePath
approach.