enabling UTF-8 encoding for clojure source files-Collection of common programming errors
I’m working on a project which involves maven, java and clojure. The problem I’m facing is this, I have some UTF-8
chars in my clojure source files because of which my source code is not interpreted correctly by the java compiler, I kinda got it working by setting the environment variable JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8
, but what I want is to pass this property through MAVEN.
I have already tried setting MAVEN_OPTS=-Dfile.encoding
but this doesn’t seem to work.
I have also tried setting configuration for the compiler plugin of maven… something like this:
-Dfile.encoding=UTF8
This doesn’t work either.
I’m I doing something wrong, or is there another way.
thanks,
RD
Ok, Here’s some more detail. This is my parent pom,
org.apache.maven.plugins
maven-compiler-plugin
1.5
1.5
UTF-8 UTF8
Nothing interesting in the child’s pom except…
src/main/clojure
;; clojure code snippet which causes problems
(let [char "?"]
(not (empty? (filter #(s/contains? % char) )))
;; The list is always empty because I never find a match if I do not set the env. variable