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!
Jake
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> BUILD FAILED
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 org.apache.tools.ant.taskdefs.Copy.validateAttributes(Copy.java:396)
JK> at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:321)
JK> at org.apache.tools.ant.Task.perform(Task.java:317)
JK> at org.apache.tools.ant.Task.perform(Task.java:332)
JK> at org.apache.tools.ant.Target.execute(Target.java:309)
JK> at org.apache.tools.ant.Target.performTasks(Target.java:334)
JK> at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
JK> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
JK> at org.apache.tools.ant.Task.perform(Task.java:317)
JK> at org.apache.tools.ant.Target.execute(Target.java:309)
JK> at org.apache.tools.ant.Target.performTasks(Target.java:334)
JK> at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
JK> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
JK> at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
JK> at org.apache.tools.ant.Task.perform(Task.java:317)
JK> at org.apache.tools.ant.Target.execute(Target.java:309)
JK> at org.apache.tools.ant.Target.performTasks(Target.java:334)
JK> at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
JK> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
JK> at org.apache.tools.ant.Task.perform(Task.java:317)
JK> at org.apache.tools.ant.Target.execute(Target.java:309)
JK> at org.apache.tools.ant.Target.performTasks(Target.java:334)
JK> at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
JK> at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
JK> at org.apache.tools.ant.Main.runBuild(Main.java:610)
JK> at org.apache.tools.ant.Main.start(Main.java:196)
JK> at org.apache.tools.ant.Main.main(Main.java:235)
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,
Jacob mailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>