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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to