The white space between the xdoclet tag and the class declaration was the puppy. Then I got errors and thus I got things working. An interesting quirk, albeit expensive in terms of time. But thanks to you I haven't washed another day out on this.
Many thanks
Mark
On 23 Nov 2003, at 10:06, Andrew Stevens wrote:
On Sun, 2003-11-23 at 01:52, Mark Lowe wrote:Hi Andrew
On 23 Nov 2003, at 00:32, Andrew Stevens wrote:
On Sat, 2003-11-22 at 13:29, Mark Lowe wrote:I'm having trouble generating the xml mapping files for hibernate. The...
task fires up the my classes compile but just cant generate the
resources from my tags.<fileset dir="${hibernate.module.src}"> <include name="**/*.java"/> </fileset>
Checking the obvious, 1) you did use javadoc comments not ordinary ones, didn't you? i.e. "/**" not just "/*"
Yes the xdoclet tags are in the following format
/** * @hibernate.class table="foo" */
2) ${hibernate.module.src} is the root of your package hierarchy, yes?
i.e. if you have com.foo.bar.SomeClass, ${hibernate.module.src}
contains
the "com" directory
This looked promising.
${hibernate.module.src} was just set to my source directory.
src/HibernateModule
so I tried what you seemed to be suggesting and made my source directory structure mirror the package
package com.foo.bar;
..
so..
${hibernate.module.src} is set to src/HibernateModule/com/foo/bar
Er, no, that's exactly the opposite of what I was suggesting. What you had before ("${hibernate.module.src} was just set to ... src/HibernateModule") looks fine, as that is the directory which contains the "com" directory. The name="**/*.java" in the fileset will then include all subdirectories, so you don't need to specify those yourself. If you'd had the dir parameter set to "src/HibernateModule/com/foo/bar" or just "src", that could have been the problem, which was why I was checking.
So, let's check for the next least obvious :-) That hibernate.class tag
you mentioned above, is that at class or method level? The hibernate
subtask has setHavingClassTag("hibernate.class"); in its setup, so it'll
only process classes with a class-level hibernate.class tag. Assuming
you are putting it at class-level, does its javadoc comment appear
immediately before the class declaration? i.e.
/**
* @hibernate.class table="foo"
*/
public class Foo
...
The javadoc specs say nothing should appear between the comment and the
declaration; if there's any ordinary comments (or possibly even blank
lines, though I haven't tested that myself) in between, that could cause
it to overlook the comment, and hence skip the class. Also, it must be
the class declaration that it precedes, if you put it before the package
statement or imports then that won't work either.
Failing that, perhaps you could post a (small) example class which isn't
working, so we can try and spot what's up with it? The fact that the
task runs without printing out any errors suggests its classpath is
okay, so the problem is more likely with the source classes themselves.
Andrew.
But the same problem..
Oh well. Try again tomorrow I guess.
Cheers Mark
Andrew.
------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
