CopyAndReplace taskdef and recent Ant
Stefan Armbruster <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <1060691556.17247.169.camel@darthvader> |
Hi,
I tried to build Barracuda with a actual CVS version of Ant. It fails,
see below.
Ant 1.6 alpha produces this error:
ava.lang.ClassCastException
at
org.enhydra.barracuda.taskdefs.CopyAndReplace.doFileOperations(CopyAndReplace.java:199)
at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:449)
at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:272)
at org.apache.tools.ant.Task.perform(Task.java:401)
at org.apache.tools.ant.Target.execute(Target.java:347)
at org.apache.tools.ant.Target.performTasks(Target.java:374)
at org.apache.tools.ant.Project.executeTarget(Project.java:1228)
at
org.apache.tools.ant.Project.executeTargets(Project.java:1085)
at org.apache.tools.ant.Main.runBuild(Main.java:662)
at org.apache.tools.ant.Main.startAnt(Main.java:220)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:162)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:85)
It looks like ant changed it's internal behaviour. Up to Ant 1.5.3
fileCopyMap.get(fromFile) returned a String. Looking at the sources of
1.6 Alpha the Copy (which is the superclass of CopyAndReplace) task uses
now String[] instead. I'm assuming, the Copy task is extended to write
copies in multiple directories.
I'm not sure, but I think we had a discussion if CopyAndReplace is still
necessary since Ant provides almost the same functionality itself. If we
want to keep CopyAndReplace, I'd volunteer to fix this in order to work
with Ant 1.5.3 and Ant 1.6
Regards,
Stefan