I recently found XSDCompiler inside the castor source code base. I am assuming I am supposed to use this with ant and not the ones on this web page http://bugzilla.exolab.org/show_bug.cgi?id=885 which I was given earlier?

XSDCompiler crashes on me with "Error reading include file" because it is reading it from the directory where ant is running and not the directory the original file was pulled from. SourceGenerator does it correctly, but XSDCompiler does not.

************SOLUTION FOR BUG****************
I believe this is due to line 154 in XSDCompiler which says sgen.generateSource(new FileReader(schema), pkgName). Because the file name is not passed to the sourcegenerator, the SourceGenerator does not know where the first schema came from and so it defaults to the directory the JVM is running in which is incorrect. If this is fixed though, I am worried about some earlier posts I was seeing concerning sun.reflect.MethodAccessorImpl with jdk1.4 and ant. I had this same problem when I tried using the ant task "java" and calling the SourceGenerator directly.

Also, how do I override the type/element property? Please don't tell me to put castor-builder.properties in my home directory as this is an unclean hack(The rest of my team doesn't have it in their home directory). I am of the philosophy you should be able to check out and build with no setup of environment except installation of jdk. There is no attribute in the ant task to do this. There is no classpath for the XSD task either. How do I compile using type vs. element with XSDCompiler Ant task.

**************FIX 2 - cut and paste code from**********************
Also, Also, The ant task XSDCompiler doesn't allow for multiple schemas. Am I using the right ant task. Some of the ones on http://bugzilla.exolab.org/show_bug.cgi?id=885 allowed a directory. Can someone cut and paste code from this ant task.....
http://bugzilla.exolab.org/showattachment.cgi?attach_id=99
on the "dir" variable and the processing for it. Am I supposed to be using this Ant task instead? but if I am, why isn't this in the castor base instead of XSDCompiler.

very confused developer here with all the ant tasks all over the place,
thanks for help here,
Dean

----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev

Reply via email to