You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Shatzer, Larry" <La...@MIROtechnologies.com> on 2005/01/28 01:05:31 UTC
taskdef failing when classpathref contains a non existent directo
ry
Consider the following directory structure and build file:
You have a build.xml in the root directory, with a directory named lib1 with
the ant-contrib jar file found in there.
Here is your build file:
<project name="test" default="test">
<path id="local.classpath">
<fileset dir="./lib1">
<include name="**/*.jar"/>
</fileset>
<fileset dir="./lib2">
<include name="**/*.jar"/>
</fileset>
</path>
<taskdef
resource="net/sf/antcontrib/antcontrib.properties"
classpathref="local.classpath"
/>
<target name="test">
<echo message="Made it"/>
</target>
</project>
If you run this, you get:
BUILD FAILED
C:\sandbox\test\build.xml:10: C:\sandbox\test\lib2 not found.
Now if you add the directory lib2, it works fine.
I found this with a project we are doing in house where we have a master
build script running over a list of sub-projects building it, and some of
the sub-projects will not have a lib directory.
Is it possible to have non existent directories listed in your path, and not
have taskdef blow up on it?
-- Larry
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: taskdef failing when classpathref contains a non existent directo ry
Posted by Antoine Levy-Lambert <an...@gmx.de>.
Hello Larry,
the issue is not one of taskdef.
fileset s are not happy when basedir does not exist.
I think there is a bug report of other(s) users having trouble with
this.
Cheers,
Antoine
> Consider the following directory structure and build file:
>
> You have a build.xml in the root directory, with a directory named lib1
> with
> the ant-contrib jar file found in there.
>
> Here is your build file:
>
> <project name="test" default="test">
> <path id="local.classpath">
> <fileset dir="./lib1">
> <include name="**/*.jar"/>
> </fileset>
> <fileset dir="./lib2">
> <include name="**/*.jar"/>
> </fileset>
> </path>
> <taskdef
> resource="net/sf/antcontrib/antcontrib.properties"
> classpathref="local.classpath"
> />
> <target name="test">
> <echo message="Made it"/>
> </target>
> </project>
>
> If you run this, you get:
>
> BUILD FAILED
> C:\sandbox\test\build.xml:10: C:\sandbox\test\lib2 not found.
>
> Now if you add the directory lib2, it works fine.
>
> I found this with a project we are doing in house where we have a master
> build script running over a list of sub-projects building it, and some of
> the sub-projects will not have a lib directory.
>
> Is it possible to have non existent directories listed in your path, and
> not
> have taskdef blow up on it?
>
> -- Larry
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org