ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <anto...@gmx.de>
Subject Re: taskdef failing when classpathref contains a non existent directo ry
Date Fri, 28 Jan 2005 11:40:40 GMT
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


Mime
View raw message