I finally tracked down the problem I had with one particular .clj file not being included from the .jar file. It turns out that under some circumstances, clojure-maven-plugin fails to discover a namespace in a .clj file. Those circumstances are:
The default character set on the build machine is not UTF-8 (As it happened on one (but not all) of out Jenkins slaves)
It does not help the situation that java.util.Scanner just reports that it cannot find any more tokens if it encounters some "invalid" data in the stream.
This patch makes sure that project.build.sourceEncoding, if specified, is used when creating Scanner instances. Our pom files did correctly specified sourceEncoding as UTF-8.
I am not experienced in Maven plugin development, so I am not sure if this patch solves more problems than it can potentially cause. There is probably some poor soul out there who is unwittingly relying on the current behavior. At least I just wanted to draw attention to this issue.
I finally tracked down the problem I had with one particular .clj file not being included from the .jar file. It turns out that under some circumstances, clojure-maven-plugin fails to discover a namespace in a .clj file. Those circumstances are:
It does not help the situation that java.util.Scanner just reports that it cannot find any more tokens if it encounters some "invalid" data in the stream.
This patch makes sure that project.build.sourceEncoding, if specified, is used when creating Scanner instances. Our pom files did correctly specified sourceEncoding as UTF-8.
I am not experienced in Maven plugin development, so I am not sure if this patch solves more problems than it can potentially cause. There is probably some poor soul out there who is unwittingly relying on the current behavior. At least I just wanted to draw attention to this issue.