ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <>
Subject Re: Ant 1.5 problem with copy task after using ant task with inheritAll=false to call a subproject...
Date Thu, 01 Aug 2002 21:35:26 GMT

Just a quick follow-up...

I tried changing the custom <copyrepl> task with <copy> and things
worked fine in Ant-1.5 even when using the <ant> call.  I guess that
means that either the custom <copyrepl> task is somewhat incompatible
with Ant-1.5 or it is some sort of classpath issue.

It would be strange if the reason for the failure is that the task is
incompatible because it works when not run through the <ant> task and
works fine in all cases in Ant-1.4.1.

So, does that mean it is a classpath issue?  The subproject generates
its own classpath including the CopyAndReplace Ant task.  However, the
superbuild also creates a classpath including that task.  But, then
again, I have had no other issues that would point to a problem with
the classpath.

This is kind of mysterious!


Thursday, August 01, 2002, 3:58:51 PM, you wrote:

JK> Hi,

JK> I'm having a problem with a custom ant task that extends the Copy
JK> task, but only in conjunction with Ant-1.5 and using the the <ant>
JK> task with inheritAll="false".  Actually, I don't know if the
JK> inheritAll=false is suspect, but it seems it would have something to
JK> do with it and I can't test it with inheritAll=true because I would
JK> expect the build to fail in that case.  The thing is, this works in Ant-1.4.1 *and*
if I don't go
JK> through the <ant> call to the subproject but run the build straight
JK> from that subproject's build.xml, ant-1.5 works fine as well.  Any
JK> ideas?  Below is all the pertinent info...

JK> Here is the call to the subproject:

JK> <ant dir="${src.dir}/${src.package.path}/contrib/${subproject}/webapp" target="${finaltarget}"
inheritAll="false" />

JK> Here is the target (which gets called because of dependencies) that
JK> fails:

JK>     <!-- deploy mockups -->
JK>     <target name="deploy_mockups" depends="prepare" >
JK>         <!-- description="Deploy the mockups to dev directories and munge contents
as needed" -->

JK>         <taskdef
JK>             name="copyrepl"
JK>             classname="org.enhydra.barracuda.taskdefs.CopyAndReplace" >
JK>             <classpath refid="compile.classpath" />
JK>         </taskdef>
JK>         <copyrepl
JK>             todir="${src.home}/${src.package.path}/examples/xmlc"
JK>             mappings="${src.mockup.home}/examples/options.mappings"
JK>             ssi="false" >
JK>             <fileset
JK>                 dir="${src.mockup.home}/examples"
JK>                 includes="**/*.html,**/*.xmlc"
JK>                 excludes="index.html" />
JK>         </copyrepl>

JK>     </target>

JK> Here is the failure message after running with the -verbose flag:

JK> deploy_mockups:
JK> Trying to override old definition of task copyrepl

JK> file:D:/myclasses/repository/enhydra/Barracuda_2002-08-01/Barracuda/src/org/enhy
JK> dra/barracuda/contrib/dbroggisch/webapp/build.xml:435: Specify at least one sour
JK> ce - a file or a fileset.
JK>         at
JK>         at
JK>         at
JK>         at
JK>         at
JK>         at
JK>         at
JK>         at
JK>         at
JK>         at
JK>         at
JK>         at
JK>         at
JK>         at

JK>         at
JK>         at
JK>         at
JK>         at
JK>         at
JK>         at
JK>         at
JK>         at
JK>         at
JK>         at
JK>         at
JK>         at
JK>         at

JK> It is complaining about not finding a file or fileset to work on, but
JK> it is obviously included within the <copyrepl> task.  What gives?
JK> I've attached the taskdef in a zip file in case someone wants to see
JK> the source to the taskdef.  However, it seems that since the taskdef
JK> works just fine in Ant 1.4.1 in all cases and in 1.5 in the case that
JK> the subproject build is run directly rather than through and <ant>
JK> call, I don't see why the taskdef should be at issue.

JK> Thanks,

JK> Jake

Best regards,

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message