I hope this can help
Markus Garscha wrote:
>hi,
>
>the same problem:
>
>/home/gama/prog/java/jboss/build.xml:56: taskdef class
>xdoclet.ejb.EjbDocletTask cannot be found
>
>something does goes wrong with ant. ant can't find the class, but the
>file xdoclet.jar exists and it is the correct classpath... ;(
>
>markus
>
>* kiuma <[EMAIL PROTECTED]> [2002-10-08 15:37]:
>
>>in build.xml
>>
>>
>><target depends="init" name="xdoclet-generate">
>> <taskdef classname="xdoclet.modules.ejb.EjbDocletTask"
>>name="ejbdoclet">
>> <classpath refid="base.path"/>
>> </taskdef>
>>
>> <taskdef classname="xdoclet.modules.web.WebDocletTask"
>>name="webdoclet">
>> <classpath refid="base.path"/>
>> </taskdef>
>>
>> <ejbdoclet destdir="${build.generate.dir}"
>>ejbspec="${ejb.version}" excludedtags="@version,@author"
>>force="${xdoclet.force}"
>> mergedir="${src.resources.dir}/xdoclet">
>> <fileset dir="${src.ejb.dir}">
>> <include name="**/*Bean.java"/>
>> </fileset>
>>
>> <packageSubstitution packages="session,entity"
>>substituteWith="interfaces"/>
>> <dataobject/>
>> <localinterface/>
>> <localhomeinterface/>
>> <remoteinterface/>
>> <homeinterface/>
>> <entitypk/>
>> <entitybmp/>
>> <entitycmp/>
>> <deploymentdescriptor destdir="${build.dir}/META-INF"/>
>> <!-- AS 4/29/02 Do not validate XML files because JBoss 3.0
>>message driven will
>> report an wrong error because it uses the wrong jboss.dtd -->
>> <jboss datasource="${datasource.name}"
>>destdir="${build.dir}/META-INF" typemapping="${type.mapping}"
>>unauthenticatedPrincipal="${jboss.guest}" validateXml="false"
>>version="${jboss.version}" xmlencoding="UTF-8"/>
>> </ejbdoclet>
>></target>
>>
>>Markus Garscha wrote:
>>
>>>Hi!
>>>
>>>ok, i included an echo tag. i got the following output:
>>>
>>>Buildfile: build.xml
>>>
>>>init:
>>> [echo]
>>>classpath=/usr/share/ant/lib/ant.jar:/home/gama/prog/java/jboss/lib/xdoclet.jar:/home/gama/prog/java/jboss/lib/log4j.jar
>>>
>>>xdoclet:
>>>
>>>BUILD FAILED
>>>
>>>/home/gama/prog/java/jboss/build.xml:56: taskdef class
>>>xdoclet.ejb.EjbDocletTask cannot be found
>>>
>>>Total time: 2 seconds
>>>
>>>thanx
>>>markus
>>>
>>>
>>>* Jon Haugsand <[EMAIL PROTECTED]> [2002-10-08 12:39]:
>>>
>>>>* Markus Garscha
>>>>
>>>>>Hi!
>>>>>
>>>>>what's wrong?
>>>>>-------------------------------8<--------------------------
>>>>>gama@ws:~/prog/java/jboss$ ant xdoclet
>>>>>Buildfile: build.xml
>>>>>
>>>>>init:
>>>>>
>>>>>xdoclet:
>>>>>
>>>>>BUILD FAILED
>>>>>
>>>>>/home/gama/prog/java/jboss/build.xml:54: taskdef class
>>>>>xdoclet.ejb.EjbDocletTask cannot be found
>>>>> <!-- EJB XDoclet -->
>>>>> <target name="xdoclet" depends="init">
>>>>> <taskdef name="xdoclet" classname="xdoclet.ejb.EjbDocletTask"
>>>>> classpath="${xdoclet.classpath}"/>
>>>>>
>
>
>-------------------------------------------------------
>This sf.net email is sponsored by:ThinkGeek
>Welcome to geek heaven.
>http://thinkgeek.com/sf
>_______________________________________________
>JBoss-user mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/jboss-user
>.
>
<?xml version="1.0" encoding="UTF-8"?>
<!-- ======================================================================= --><!-- Template build file --><!-- ======================================================================= --><project basedir="." default="main" name="template">
<!--
Give user a chance to override without editing this file
(and without typing -D each time they run it)
<property file="${xdoclet.home}/build.properties}"/>
-->
<property file=".ant.properties-cvsxdoclet"/>
<property file="${user.home}/.ant.properties"/>
<property name="Name" value="Template"/>
<property name="version" value="1.1"/>
<target name="check-jboss" unless="jboss.home">
<fail>
Property "jboss.home" is not set. Please use the file
".ant.properties" in this directory ${basedir} to
set this property. It must point to the directory which
contains the following directory: "deploy", "conf", "tmp"
etc.
</fail>
</target>
<target name="wrong-jboss" unless="jboss.present">
<fail>
Property "jboss.home" is set but it does not seem
to point to the right directory. The file "run.jar"
must be available at ${jboss.home}/bin.
</fail>
</target>
<target name="check-xdoclet" unless="xdoclet.home">
<fail>
Property "xdoclet.home" is not set. Please use the file
".ant.properties" in this directory ${basedir} to
set this property. It must point to the root directory of
XDoclet distribution.
</fail>
</target>
<target name="wrong-xdoclet" unless="xdoclet.present">
<fail>
Property "xdoclet.home" is set but it does not seem
to point to the right directory. The file "xdoclet.jar"
must be available at ${xdoclet.home}/lib.
</fail>
</target>
<target name="check-environment">
<antcall target="check-jboss"/>
<available file="${jboss.home}/bin/run.jar" property="jboss.present"/>
<antcall target="wrong-jboss"/>
<antcall target="check-xdoclet"/>
<available file="${xdoclet.home}/lib/xdoclet.jar" property="xdoclet.present"/>
<antcall target="wrong-xdoclet"/>
</target>
<target depends="check-environment" name="init">
<echo message="build.compiler = ${build.compiler}"/>
<echo message="user.home = ${user.home}"/>
<echo message="java.home = ${java.home}"/>
<echo message="ant.home = ${ant.home}"/>
<echo message="jboss.home = ${jboss.home}"/>
<echo message="xdoclet.home = ${xdoclet.home}"/>
<echo message="java.class.path = ${java.class.path}"/>
<echo message=""/>
<available classname="java.lang.StrictMath" property="jdk1.3+"/>
</target>
<property name="jboss.lib" value="${jboss.home}/lib"/>
<property name="jboss.client" value="${jboss.home}/client"/>
<!-- Configuration used on JBoss 3 to run your server. There must be
a directory with the same name under "${jboss.home}/server" -->
<property name="jboss.configuration" value="default"/>
<property name="jboss.deploy" value="${jboss.home}/server/${jboss.configuration}/deploy"/>
<property name="src.dir" value="${basedir}/src"/>
<property name="src.main.dir" value="${src.dir}/main"/>
<property name="src.struts.dir" value="${src.main.dir}/struts"/>
<property name="src.strutsgen.dir" value="${src.main.dir}/strutsgen"/>
<property name="src.utils.dir" value="${src.main.dir}/utils"/>
<property name="src.ejb.dir" value="${src.main.dir}/ejb"/>
<property name="src.servlet.dir" value="${src.main.dir}/servlet"/>
<property name="src.resources.dir" value="${src.dir}/resources"/>
<property name="src.web.dir" value="${src.dir}/web"/>
<property name="src.etc.dir" value="${src.dir}/etc"/>
<property name="lib.dir" value="${basedir}/lib"/>
<property name="build.dir" value="${basedir}/build"/>
<property name="build.tmp.dir" value="${build.dir}/tmp"/>
<property name="build.deploy.dir" value="${build.dir}/deploy"/>
<property name="build.generate.dir" value="${build.dir}/generate"/>
<property name="build.classes.dir" value="${build.dir}/classes"/>
<property name="build.war.dir" value="${build.dir}/war"/>
<property name="build.client.dir" value="${build.dir}/client"/>
<!--<property name="build.bin.dir" value="${build.dir}/bin"/>-->
<property name="build.javadocs.dir" value="${build.dir}/docs/api"/>
<path id="generic.path">
<fileset dir="./libs">
<include name="*.jar"/>
</fileset>
</path>
<path id="struts.path">
<fileset dir="${struts.home}/lib">
<include name="*.jar"/>
</fileset>
</path>
<path id="xdoclet.path">
<path refid="generic.path"/>
<path refid="struts.path"/>
<pathelement location="${ant.home}/lib/ant.jar"/>
<fileset dir="${xdoclet.home}/lib">
<include name="*.jar"/>
</fileset>
</path>
<path id="base.path">
<path refid="xdoclet.path"/>
<pathelement location="${jboss.client}/jboss-j2ee.jar"/>
<pathelement location="${jboss.client}/jnp-client.jar"/>
<pathelement location="${jboss.client}/jbossmq-client.jar"/>
<pathelement location="${jboss.client}/jbosssx-client.jar"/>
<pathelement location="${jboss.client}/concurrent.jar"/>
<pathelement location="${jboss.client}/jaas.jar"/>
<pathelement location="${jboss.lib}/jboss-jmx.jar"/>
<pathelement location="${jboss.home}/server/${jboss.configuration}/lib/jbosssx.jar"/>
<pathelement location="${jboss.home}/server/${jboss.configuration}/lib/mail.jar"/>
<pathelement location="${build.classes.dir}"/>
</path>
<!-- =================================================================== -->
<!-- Generates the necessary EJB classes and deployment descriptors -->
<!-- =================================================================== -->
<target depends="init" name="xdoclet-generate">
<taskdef classname="xdoclet.modules.ejb.EjbDocletTask" name="ejbdoclet">
<classpath refid="base.path"/>
</taskdef>
<taskdef classname="xdoclet.modules.web.WebDocletTask" name="webdoclet">
<classpath refid="base.path"/>
</taskdef>
<ejbdoclet destdir="${build.generate.dir}" ejbspec="${ejb.version}" excludedtags="@version,@author" force="${xdoclet.force}" mergedir="${src.resources.dir}/xdoclet">
<fileset dir="${src.ejb.dir}">
<include name="**/*Bean.java"/>
</fileset>
<packageSubstitution packages="session,entity" substituteWith="interfaces"/>
<dataobject/>
<localinterface/>
<localhomeinterface/>
<remoteinterface/>
<homeinterface/>
<entitypk/>
<entitybmp/>
<entitycmp/>
<deploymentdescriptor destdir="${build.dir}/META-INF"/>
<!-- AS 4/29/02 Do not validate XML files because JBoss 3.0 message driven will
report an wrong error because it uses the wrong jboss.dtd -->
<jboss datasource="${datasource.name}" destdir="${build.dir}/META-INF" typemapping="${type.mapping}" unauthenticatedPrincipal="${jboss.guest}" validateXml="false" version="${jboss.version}" xmlencoding="UTF-8"/>
</ejbdoclet>
<!--
<webdoclet
destdir="${build.generate.dir}"
excludedtags="@version,@author"
mergedir="${src.resources.dir}/xdoclet"
>
<fileset dir="${src.servlet.dir}">
<include name="**/*Servlet.java"/>
</fileset>
<fileset dir="${src.ejb.dir}">
<include name="**/*Bean.java.dis"/>
</fileset>
<deploymentdescriptor destdir="${build.dir}/WEB-INF"/>
</webdoclet>
-->
</target>
<!-- =================================================================== -->
<!-- Compiles the source code -->
<!-- =================================================================== -->
<target depends="xdoclet-generate" name="compile">
<mkdir dir="${build.classes.dir}"/>
<javac classpathref="base.path" debug="on" deprecation="off" destdir="${build.classes.dir}" optimize="on">
<src path="${src.ejb.dir}"/>
<src path="${build.generate.dir}"/>
</javac>
</target>
<!-- =================================================================== -->
<!-- Creates the jar archives -->
<!-- =================================================================== -->
<target depends="compile" name="jar">
<mkdir dir="${build.deploy.dir}"/>
<mkdir dir="${build.client.dir}"/>
<!--<mkdir dir="${build.bin.dir}"/>-->
<jar jarfile="${build.deploy.dir}/ejb-webappointments.jar">
<fileset dir="${build.classes.dir}" includes="com/wingstech/webappointments/entity/**,com/wingstech/webappointments/session/**,com/wingstech/webappointments/message/**,com/wingstech/webappointments/interfaces/**">
</fileset>
<fileset dir="${build.classes.dir}" includes="com/wingstech/webappointments/utils/**">
</fileset>
<fileset dir="${build.dir}" includes="META-INF/**">
</fileset>
</jar>
<jar jarfile="${build.client.dir}/client-test.jar">
<fileset dir="${build.classes.dir}" includes="com/wingstech/webappointments/interfaces/**,com/wingstech/webappointments/client/**">
</fileset>
</jar>
</target>
<!-- =================================================================== -->
<!-- Compiles the WEB source code -->
<!-- =================================================================== -->
<target depends="compile" if="servlet-lib.path" name="compile-web">
<mkdir dir="${build.war.dir}/WEB-INF/classes"/>
<copy todir="${build.war.dir}/WEB-INF/classes">
<fileset dir="${src.resources.dir}/properties" includes="**/*.properties"/>
</copy>
<path id="web.path">
<path refid="base.path"/>
<pathelement location="${servlet-lib.path}"/>
</path>
<javac classpathref="web.path" debug="on" deprecation="off" destdir="${build.war.dir}/WEB-INF/classes" optimize="on">
<src path="${src.utils.dir}"/>
</javac>
<javac classpathref="web.path" debug="on" deprecation="off" destdir="${build.war.dir}/WEB-INF/classes" optimize="on">
<src path="${src.struts.dir}"/>
</javac>
<javac classpathref="web.path" debug="on" deprecation="off" destdir="${build.war.dir}/WEB-INF/classes" optimize="on">
<src path="${src.servlet.dir}"/>
</javac>
</target>
<!-- =================================================================== -->
<!-- Creates the war archives -->
<!-- =================================================================== -->
<target depends="compile-web" if="servlet-lib.path" name="war">
<mkdir dir="${build.deploy.dir}"/>
<copy todir="${build.war.dir}/WEB-INF">
<fileset dir="${src.etc.dir}/WEB-INF" excludes="web.xml" includes="*.xml,lib/*.jar"/>
</copy>
<copy todir="${build.war.dir}/WEB-INF">
<fileset dir="${src.etc.dir}/WEB-INF/tld" includes="*.tld"/>
</copy>
<tstamp>
<format pattern="dd/MM/yyyy hh:mm aa" property="BUILD_TIME" unit="hour"/>
</tstamp>
<war warfile="${build.deploy.dir}/webappointments.war" webxml="${src.etc.dir}/WEB-INF/web.xml">
<fileset dir="${src.web.dir}"/>
<fileset dir="${build.war.dir}"/>
<classes dir="${build.classes.dir}" includes="com/wingstech/webappointments/interfaces/**"/>
</war>
</target>
<!-- =================================================================== -->
<!-- Creates the client binary -->
<!-- =================================================================== -->
<target depends="jar,war" name="deploy-server">
<copy todir="${jboss.deploy}">
<fileset dir="${build.deploy.dir}" includes="*.jar,*.war,*.ear">
</fileset>
</copy>
<tstamp>
<format pattern="dd/MM/yyyy hh:mm aa" property="BUILD_TIME" unit="hour"/>
</tstamp>
<echo message="Done: ${BUILD_TIME}"/>
</target>
<!-- =================================================================== -->
<!-- Creates the client binary -->
<!-- =================================================================== -->
<!--
<target name="create-client" depends="jar">
<pathconvert targetos="windows" property="jboss.home.on.windows" >
<path>
<pathelement location="${jboss.home}" />
</path>
</pathconvert>
<pathconvert targetos="windows" property="java.home.on.windows" >
<path>
<pathelement location="${java.home}" />
</path>
</pathconvert>
<pathconvert targetos="unix" property="jboss.home.on.unix" >
<path>
<pathelement location="${jboss.home}" />
</path>
</pathconvert>
<pathconvert targetos="unix" property="java.home.on.unix" >
<path>
<pathelement location="${java.home}" />
</path>
</pathconvert>
<echo message="JBoss Home on Unix: ${jboss.home.on.unix}"/>
<echo message="Java Home on Unix: ${java.home.on.unix}"/>
<filter token="jboss.home" value="${jboss.home.on.windows}"/>
<filter token="java.home" value="${java.home.on.windows}"/>
<copy todir="${build.bin.dir}" filtering="yes">
<fileset dir="${src.etc.dir}/bin" includes="run-*client.bat">
</fileset>
</copy>
<copy file="${src.etc.dir}/bin/lcp.bat" todir="${build.bin.dir}"/>
<filter token="jboss.home" value="${jboss.home.on.unix}"/>
<filter token="java.home" value="${java.home.on.unix}"/>
<copy todir="${build.bin.dir}" filtering="yes">
<fileset dir="${src.etc.dir}/bin" includes="run-*client.sh">
</fileset>
</copy>
<copy file="${src.etc.dir}/jndi.properties" todir="${build.bin.dir}"/>
</target>
-->
<!-- =================================================================== -->
<!-- Creates the binary structure -->
<!-- =================================================================== -->
<!--<target name="main" depends="deploy-server,create-client">-->
<target depends="deploy-server" name="main">
</target>
<!-- =================================================================== -->
<!-- Cleans up the current build -->
<!-- =================================================================== -->
<target depends="init" name="clean">
<delete dir="${build.dir}"/>
</target>
</project>