> I get a strange error "Duplicate class: org.yeb.json" when I use
> srcdir="src/main/java" includes="**/*.yeti".
>
> However when I use srcdir="src/main/java/org/yeb" includes="*.yeti"
> everything works fine.
...
> I have to two yeti modules to compile in the following files:
> - src/main/java/org/yeb/httpClient.yeti
> - src/main/java/org/yeb/json.yeti
>
> The httpclient module only loads the json-module.
>
> content of org.yeb.httpclient
>
> module org.yeb.httpclient;
> load org.yeb.json;
> "somm dummy string"
I couldn't reproduce on Linux.
Probable workaround: make sure that module name and filename have same
capitalization (currently you have httpclient / httpClient). Let me know,
if this helps.
> names. And I guess then the filename with windows separator gets
> stored as key in the CompileCtx.compiled map however when the filename
> is looked up through an "load module" then the / separator is used.
>
> Anyway if I replace all the \ in the source files with / in the
> execute() method of the Ant-Task than it works.
> for(int i=0;i<files.length;i++) {
> files[i] = files[i].replace(File.separator, "/");
> }
Quite a hack, but afaik shouldn't hurt.
> Btw: Why do you loop the compilation in the ant-task over the files
> with compileAll?:
> for (int i = 0; i < files.length; ++i)
> compilation.compileAll(files, 0,
> (String[]) javaOpt.toArray(new String[0]));
>
Nice catch, I've done really stupid refactoring.
commit b47a35de202ff7ad88d530a802558c9ed7181750
try {
+ String[] javaOpt = { "-encoding", "utf-8", "-d",
+ target.length() > 1 ? target : ">" };
for (int i = 0; i < files.length; ++i) {
- compilation.compile(files[i], 0);
+ compilation.compileAll(files, 0, javaOpt);
}
Commited fixes, try if the head is now ok.