Java/Clojure mixed sources and package names with dash

118 weergaven
Naar het eerste ongelezen bericht

Shantanu Kumar

ongelezen,
2 jan 2011, 13:47:4202-01-2011
aan Clojure Maven Plugin
Hi,

I am having to write some Java code that needs to be compiled before
the Clojure code goes through the compile phase. I include the Java
sources in src/main/java/foo.bar package and the Clojure sources go in
src/main/clj/foo.bar package (and all works well) -- but what happens
when the package name is actually "foo-bar"? I tried mentioning the
java package name as "foo_bar" but it's not recognized in the Clojure
sources -- I got a ClassNotFoundException.

Was anybody able to resolve this? Please let me know.

Regards,
Shantanu

Mark Derricutt

ongelezen,
2 jan 2011, 15:02:3102-01-2011
aan clojure-ma...@googlegroups.com
You can't name a java package foo-bar - the dash/minus sign is illegal.

--
"Great artists are extremely selfish and arrogant things" — Steven Wilson, Porcupine Tree

Jim

ongelezen,
18 sep 2012, 12:14:1418-09-2012
aan clojure-ma...@googlegroups.com
what if the folder is called "foo-bar" but the package declaration declares it as "foo_bar"? Isn't this allowed? I too get a ClassNotFoundException.
I cannot find the precompiled java classes through clojure! I have tried decompiling a couple of classes and the package declaration is indeed correct : foo_bar...tried requiring it from clojure with and without the hyphen but no success!

any clues?
thanks in advance...

Jim 
Allen beantwoorden
Auteur beantwoorden
Doorsturen
0 nieuwe berichten