Hi all,

I'm toying around with boot and try to get my leiningen config converted
to it.

My Clojure project uses a third-party Java library which uses a
javax.tools.JavaCompiler to compile classes at runtime.  By default,
such a JavaCompiler compiles with the CLASSPATH which is the value of
the "java.class.path" property.  However, when run via boot I get

  (System/getProperty "java.class.path")
  ;=> "/home/horn/bin/boot"

which is the boot shell script.  Cause that's not a correct CLASSPATH,
the JavaCompiler won't find any classes and error out.

It seems boot puts the "real" CLASSPATH into the property
"fake.class.path" or "boot.class.path" (I haven't found out what's
exactly the difference).  So if I'd call the JavaCompiler myself, I
could use its getTask()'s options parameter to specify something like
-cp (System/getProperty "fake.class.path").  But since the compiler is
called internally in the lib I depend on, that approach won't work.
Well, and IMHO having to consider properties defined by one specific
build tool in application code doesn't seem right, too.

What works is putting

  (System/setProperty "java.class.path"
                       (System/getProperty "fake.class.path"))

in my build.boot but I guess boot has a reason for messing with
"java.class.path" and doing the above will defeat this purpose.

Bye,
Tassilo

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to