Yeah, I posted a question about this recently. I got side-tracked and
never fully pursued the issue... I don't think it works - I saw the
same behavior as you...
Curious, why are you structuring in this fashion? Meaning performing
the taskdef in a target? Not a criticism - just curious as to why. I
had a real reason in doing so myself :)
Karr, David wrote:
I have a simple build file that compiles some files and has a taskdef
for one of the compiled classes, which indirectly references a class in
one of the jars in the classpath. I have the taskdef inside the target
which uses the task. When it executes the defined task, it fails to
find the class from that jar (NoClassDefFound). I ran SysInternals
FileMon while the build is running to verify it's reading the jar file
with that base class.
The class it can't find it
Here is my simple build file:
-----------------------
<?xml version="1.0" encoding="UTF-8"?>
<project name="WLA" default="default" basedir=".">
<description>Builds, tests, and runs the project WLA.</description>
<property file="nbuild.properties"/>
<target name="default"
depends="compile,install-label-info,build-war">
</target>
<target name="compile">
<delete dir="${build.classes.dir}"/>
<mkdir dir="${build.classes.dir}"/>
<javac srcdir="${src.dir}" destdir="${build.classes.dir}"
fork="true"
debug="true" verbose="false">
<include name="**/*.java"/>
<classpath path="${javac.classpath}"/>
</javac>
</target>
<target name="build-war">
</target>
<target name="install-label-info">
<taskdef name="p4NewestLabel"
classname="com.wamu.ant.perforce.P4NewestLabel">
<classpath path="${build.classes.dir}:${javac.classpath}"/>
</taskdef>
<echo message="classpath[${javac.classpath}]"/>
<p4NewestLabel labelName="label" labelDesc="labelDesc"/>
</target>
</project>
-----------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Scot P. Floess
27 Lake Royale
Louisburg, NC 27549
252-478-8087 (Home)
919-754-4592 (Work)
Chief Architect JPlate http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim
Architect Keros http://sourceforge.net/projects/keros
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]