The tasks loaded by ant use a different mechanism than
those used by <typedef> etal and thus by the antlib mechanism.
To allow optional tasks in an antlib one does:
<taskdef name="x" classname="y" onerror="ignore"/>
Peter
Dominique Devienne wrote:
When I setup the performance testing environment for sync,
I dropped my custom Antlib jar into a freshly made Ant CVS
HEAD distrib. I ran my build file, which referenced my old
lsync task using the antlib: magic XML namespace, and I was
surprised to get an error about a task I wasn't even using!
I always thought that tasks whose dependents cannot be found
are simply ignored, with just a warning at verbose level.
Otherwise I'd get such errors left and right for the many
optional tasks I don't have the JARs for.
So what's different in this case? BTW, I checked, and also
got an error if I used <taskdef resource=""> instead of an
XML NS, and I checked it's the same for CVS HEAD and 1.6.2.
Can someone please explain what's going on? Thanks, --DD
P:\com_lgc\cycle9>P:\oss\org_apache\ant\apache-ant-1.7alpha\bin\ant -f
sync.xml
Buildfile: sync.xml
sb-sync:
[mkdir] Created dir: P:\com_lgc\cycle9\build\sb-sync
[sync] Copying 5 files to P:\com_lgc\cycle9\build\sb-sync
dd-sync:
[mkdir] Created dir: P:\com_lgc\cycle9\build\dd-sync
BUILD FAILED
P:\com_lgc\cycle9\sync.xml:19: The following error occurred while
executing this line:
jar:file:/P:/oss/org_apache/ant/apache-ant-1.7alpha/lib/com_lgc_buildmag
ic.jar!/com/lgc/buildmagic/antlib.xm
l:5: taskdef A class needed by class com.lgc.buildmagic.JUnitx cannot be
found: junit/framework/Test
Total time: 1 second
P:\com_lgc\cycle9>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]