On Thu, 26 Feb 2004, Avril Kotzen wrote: > I have put OJB.s Article.java, AbstractArticle.java and Interface > Article .java in the ojbdoclet fileset directory. When I try to > generate repository mappings I get a file with 2 lines of comments > only. No class-descriptors are generated. These files are being picked > up as I get info messages about defaulting the package names. I have > also tried with my own java files with the same result.
General advise: If you have problems with some ant task, try to run ant with the -v option, this will generate more output. If that doesn't help, you can try the -debug option (instead of -v), but this will generate quite a lot of messages (logging mode debug). I'm not entirely sure what you mean by 'I have put OJB.s Article.java, AbstractArticle.java and InterfaceArticle.java in the ojbdoclet fileset directory'. The general idea of XDoclet is that you put special javadoc tags into your source (e.g. @ojb.class, @ojb.field etc.), then let the ant task of the specific XDoclet module (ojbdoclet in your case) process these sources, which will lead to some generated files (here: repository_user.xml and, if used, project-schema.xml). So, if you use some classes that came with OJB, it is unlikely that they contain these tags. Also, be sure that the directory structure matches the java packages. E.g., if you specify 'fileset dir="./src"' and you want to process some class mypckg.MyClass, then in the directory ./src there must be a subdirectory mypckg which contains the file MyClass.java. In general you specify the same folder(s) for the ojb xdoclet task that you use for the javac ant task. > Here is my buildfile. > <?xml version="1.0" encoding="UTF-8"?> > <!-- OJB ant build script for xdoclet use --> > <project name="OJB XDoclet" default="repository-files" > > <path id="ojb-classpath"> > <fileset dir="lib/xdoclet"> > <include name="**/*.jar"/> > </fileset> > </path> > <target name="repository-files"> > <taskdef name="ojbdoclet" > classname="xdoclet.modules.ojb.OjbDocletTask"> > <classpath refid="ojb-classpath"/> > </taskdef> > <ojbdoclet > destdir="./out"> > <fileset dir="./src"/> > <ojbrepository destinationFile="repository_user.xml"/> > > </ojbdoclet> > </target> > </project> This seems to be ok. > I have not downloaded the xdoclet code from the CVS. (firewall > restrictions). Could this be my problem? This should not be necessary. The three jars of the OJB xdoclet module (XDoclet, XJavaDoc, ojb module) correspond to the current source. > Other than -buildfile are there other arguments that I should be passing > to ant. All supported options are described in the documentation (in CVS, xdocs subdirectory; you have to build OJB's documentation with 'ant htmldocs' to generate html). Tom --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]