ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tolley Shorn" <Shorn.Tol...@nrm.qld.gov.au>
Subject [1.6b2] problem with <antcall> and <reference> - works in 1.5.x
Date Fri, 17 Oct 2003 07:11:26 GMT

I'm currently trying out the new beta of Ant for our project.
Unfortunately, our build files that work under 1.5.x (1 & 4), don't work under 1.6b2.
I've looked in the WHATSNEW file for reasons our build files might not work, but I couldn't
see anything that seemed to be related.

Unfortunately, the situation is a bit involved:

We have main build file, build.xml, that defines a patternset and a path like so:
    <patternset id="all.jars">  
        <include name="*.jar"/>
    </patternset>

    <path id="thirdparty.jars">
        <fileset dir="${thirdparty.lib}">
            <patternset refid="all.jars"/>
            <exclude name="${salmon.jar.name}"/>  
        </fileset>
    </path> 

We do our reference data loading in a different file from the main build, but want a target
on our main build file that kicks off the data loading , so we have defined a target:
    <target name="loadData" description="load data">
        <ant antfile="load.data.xml" inheritrefs="true"/>
    </target>

The relevant part of the load.data.xml file looks like this:
    <target name="loadData" description="load reference data into the database">

        <antcall target="loadFile">
            <param name="data.file" value="${version.prefix}/clean_tables.sql"/>
            <reference refid="thirdparty.jars" torefid="thirdparty.jars"/>
        </antcall>

        <antcall target="loadFile">
            <param name="data.file" value="${version.prefix}/cl_user_root.sql"/>
        </antcall>
	  ...
     </target>

The <reference> task was a wierd hack that I needed to put in or the "loadFile" target
wouldn't see the "thirdparty.jars" path reference, but it didn't need to be put in the other
antcall tasks.


So, on 1.5.x this setup works fine (though I gotta say I'll be happy when I can start using
import, subAnt and macroDefs to start doign this stuff).  
On 1.6b2, it fails with like this:
-----------8<-----------------
Buildfile: build.xml

loadData:
Caught exception (org.apache.tools.ant.BuildException) while expanding xdoclet.classpath:
Reference all.jars not found.
Caught exception (org.apache.tools.ant.BuildException) while expanding thirdparty.jars: Reference
all.jars not found.

loadData:
Caught exception (org.apache.tools.ant.BuildException) while expanding thirdparty.jars: Reference
all.jars not found.

loadFile:

BUILD FAILED
D:\Tomcat4.1\webapps\clas113\WEB-INF\load.data.xml:42: Reference all.jars not found.
-----------8<-----------------
(The xdoclect.classpath reference is defined in build.xml, but not mentioned at all in the
load.data.xml file)


Anyone have any ideas?

Our app is in production currently, so we'd really like to be able to run our old scripts
under 1.6.  Otherwise, our developers will have to alter their environment every time they
switch between the production and development branches.

(Sorry for the huge post :)

Cheers,
Shorn.






************************************************************************
The information in this e-mail together with any attachments is
intended only for the person or entity to which it is addressed
and may contain confidential and/or privileged material.
Any form of review, disclosure, modification, distribution
and/or publication of this e-mail message is prohibited.  
If you have received this message in error, you are asked to
inform the sender as quickly as possible and delete this message
and any copies of this message from your computer and/or your
computer system network.  
************************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message