You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by sa...@04web.com on 2004/06/18 13:15:09 UTC
ojbdoclet task
I am trying to use the ojbdoclet example but I am getting the following
error in ant:
build.xml:41: The <taskdef> task doesn't support the nested "ojbdoclet"
element.
My build.xml:
<project default="repository-files">
<property name="dir.src" location="src"/>
<property name="dir.lib" location="lib"/>
<property name="dir.java" location="${dir.src}/java"/>
<property name="dir.ojb" location="${dir.src}/metadata/ojb"/>
<property name="dir.torque" location="${dir.src}/metadata/torque"/>
<property name="plugin.ojb" location="plugins/ojb"/>
<path id="classpath.project">
<fileset dir="${dir.lib}">
<include name="**/*.jar"/>
</fileset>
</path>
<path id="classpath.ojbdoclet">
<path refid="classpath.project"/>
<fileset dir="${plugin.ojb}/lib">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="init">
<mkdir dir="${dir.ojb}"/>
<mkdir dir="${dir.torque}"/>
</target>
<target name="repository-files" depends="init">
<!--
<java classname="xdoclet.modules.ojb.OjbDocletTask"
classpathref="classpath.ojbdoclet"/>
This gives a java.lang.NoSuchMethodException:
xdoclet.modules.ojb.OjbDocletTask.main([Ljava.lang.String;)
therefore the classpath is correct.
-->
<taskdef name="ojbdoclet"
classname="xdoclet.modules.ojb.OjbDocletTask"
classpathref="classpath.ojbdoclet"
>
<ojbdoclet destdir="${dir.ojb}">
<fileset dir="${dir.java}"/>
<ojbrepository
destinationFile="${dir.ojb}/repository_user.xml"/>
<torqueschema databaseName="nortmais"
destinationFile="${dir.torque}/project-schema.xml"/>
</ojbdoclet>
</taskdef>
</target>
</project>
Regards,
Pedro Salgado
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: ojbdoclet task
Posted by sa...@04web.com.
That did the trick... ( a copy&paste error :( )
Thank you,
Pedro Salgado
> Ant's taskdef task simply loads a task at runtime and declares an
> alias. As such, you don't nest the new task into the taskdef task.
> Change your build file like so:
>
> <taskdef name="ojbdoclet"
> classname="xdoclet.modules.ojb.OjbDocletTask"
> classpathref="classpath.ojbdoclet" />
> <ojbdoclet destdir="${dir.ojb}">
> <fileset dir="${dir.java}" />
> <ojbrepository destinationFile="${dir.ojb}/repository_user.xml" />
> <torqueschema databaseName="nortmais"
> destinationFile="${dir.torque}/project-schema.xml" />
> </ojbdoclet>
>
> Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: ojbdoclet task
Posted by Thomas Dudziak <to...@first.fhg.de>.
salgado.pc@04web.com wrote:
> I am trying to use the ojbdoclet example but I am getting the following
>error in ant:
>
>build.xml:41: The <taskdef> task doesn't support the nested "ojbdoclet"
>element.
>
> My build.xml:
>
>
><project default="repository-files">
>
> <property name="dir.src" location="src"/>
> <property name="dir.lib" location="lib"/>
>
> <property name="dir.java" location="${dir.src}/java"/>
>
> <property name="dir.ojb" location="${dir.src}/metadata/ojb"/>
> <property name="dir.torque" location="${dir.src}/metadata/torque"/>
>
> <property name="plugin.ojb" location="plugins/ojb"/>
>
> <path id="classpath.project">
> <fileset dir="${dir.lib}">
> <include name="**/*.jar"/>
> </fileset>
> </path>
> <path id="classpath.ojbdoclet">
> <path refid="classpath.project"/>
> <fileset dir="${plugin.ojb}/lib">
> <include name="**/*.jar"/>
> </fileset>
> </path>
>
> <target name="init">
>
> <mkdir dir="${dir.ojb}"/>
> <mkdir dir="${dir.torque}"/>
>
> </target>
>
> <target name="repository-files" depends="init">
> <!--
> <java classname="xdoclet.modules.ojb.OjbDocletTask"
>classpathref="classpath.ojbdoclet"/>
>
> This gives a java.lang.NoSuchMethodException:
>xdoclet.modules.ojb.OjbDocletTask.main([Ljava.lang.String;)
> therefore the classpath is correct.
> -->
>
> <taskdef name="ojbdoclet"
> classname="xdoclet.modules.ojb.OjbDocletTask"
> classpathref="classpath.ojbdoclet"
> >
> <ojbdoclet destdir="${dir.ojb}">
> <fileset dir="${dir.java}"/>
> <ojbrepository
>destinationFile="${dir.ojb}/repository_user.xml"/>
> <torqueschema databaseName="nortmais"
>destinationFile="${dir.torque}/project-schema.xml"/>
> </ojbdoclet>
> </taskdef>
>
> </target>
>
></project>
>
>
Ant's taskdef task simply loads a task at runtime and declares an
alias. As such, you don't nest the new task into the taskdef task.
Change your build file like so:
<taskdef name="ojbdoclet"
classname="xdoclet.modules.ojb.OjbDocletTask"
classpathref="classpath.ojbdoclet" />
<ojbdoclet destdir="${dir.ojb}">
<fileset dir="${dir.java}" />
<ojbrepository destinationFile="${dir.ojb}/repository_user.xml" />
<torqueschema databaseName="nortmais"
destinationFile="${dir.torque}/project-schema.xml" />
</ojbdoclet>
Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org