ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Ant 1.5 problem with copy task after using ant task with inheritAll=false to call a subproject...
Date Thu, 01 Aug 2002 20:58:51 GMT

Hi,

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

Here is the call to the subproject:

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

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

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

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

    </target>

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

deploy_mockups:
Trying to override old definition of task copyrepl

BUILD FAILED
file:D:/myclasses/repository/enhydra/Barracuda_2002-08-01/Barracuda/src/org/enhy
dra/barracuda/contrib/dbroggisch/webapp/build.xml:435: Specify at least one sour
ce - a file or a fileset.
        at org.apache.tools.ant.taskdefs.Copy.validateAttributes(Copy.java:396)
        at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:321)
        at org.apache.tools.ant.Task.perform(Task.java:317)
        at org.apache.tools.ant.Task.perform(Task.java:332)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:334)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
        at org.apache.tools.ant.Task.perform(Task.java:317)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:334)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
        at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)

        at org.apache.tools.ant.Task.perform(Task.java:317)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:334)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
        at org.apache.tools.ant.Task.perform(Task.java:317)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:334)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
        at org.apache.tools.ant.Main.runBuild(Main.java:610)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)


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


Thanks,

Jake
Mime
View raw message