DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=41 086>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=41086 a> Summary: copy with filter fails on nested substitutions Product: Ant Version: 1.7.0RC1 Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Core AssignedTo: devant.apache.org ReportedBy: dlipofskygmail.com This worked with Ant 1.6.5 but fails with 1.7.0RC1. ==> build.xml <== <project name="test" default="test" basedir="."> <target name="test"> <filter filtersfile="filter.properties" /> <copy file="test.txt" tofile="filtered.txt" filtering="true" overwrite="true"/> </target> </project> ==> filter.properties <== a=aaa b=bbb c=a:b ==> test.txt <== a b c This is the output I get $ ant -v Apache Ant version 1.7.0RC1 compiled on November 5 2006 Buildfile: build.xml Detected Java version: 1.4 in: C:jdk1.4.2jre Detected OS: Windows XP parsing buildfile C:srctmpbuild.xml with URI = file:/C:/src/tmp/build.xml Project base dir set to: C:srctmp Build sequence for target(s) `test' is [test] Complete build sequence is [test, ] test: [antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found. [filter] Reading filters from C:srctmpfilter.properties Reading filters from C:srctmpfilter.properties [copy] Copying 1 file to C:srctmp [copy] Copying C:srctmptest.txt to C:srctmpfiltered.txt Replacing: a -> aaa Replacing: b -> bbb Replacing: a -> aaa BUILD FAILED C:srctmpbuild.xml:4: java.lang.NullPointerException at org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:115) at org.apache.tools.ant.Task.perform(Task.java:342) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.ja va:1292) at org.apache.tools.ant.Project.executeTarget(Project.java:1261 ) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(D efaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:114 4) at org.apache.tools.ant.Main.runBuild(Main.java:698) at org.apache.tools.ant.Main.startAnt(Main.java:199) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:298) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) Caused by: java.lang.NullPointerException at org.apache.tools.ant.types.FilterSet.replaceTokens(FilterSet .java:565) at org.apache.tools.ant.types.FilterSet.iReplaceTokens(FilterSe t.java:525) at org.apache.tools.ant.types.FilterSet.replaceTokens(FilterSet .java:576) at org.apache.tools.ant.types.FilterSet.iReplaceTokens(FilterSe t.java:525) at org.apache.tools.ant.types.FilterSet.replaceTokens(FilterSet .java:389) at org.apache.tools.ant.types.FilterSetCollection.replaceTokens (FilterSetCollection.java:78) at org.apache.tools.ant.util.ResourceUtils.copyResource(Resourc eUtils.java:311) at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java: 507) at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java: 322) at org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.jav a:793) at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:532) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.j ava:288) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:105) ... 11 more --- Nested Exception --- java.lang.NullPointerException at org.apache.tools.ant.types.FilterSet.replaceTokens(FilterSet .java:565) at org.apache.tools.ant.types.FilterSet.iReplaceTokens(FilterSe t.java:525) at org.apache.tools.ant.types.FilterSet.replaceTokens(FilterSet .java:576) at org.apache.tools.ant.types.FilterSet.iReplaceTokens(FilterSe t.java:525) at org.apache.tools.ant.types.FilterSet.replaceTokens(FilterSet .java:389) at org.apache.tools.ant.types.FilterSetCollection.replaceTokens (FilterSetCollection.java:78) at org.apache.tools.ant.util.ResourceUtils.copyResource(Resourc eUtils.java:311) at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java: 507) at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java: 322) at org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.jav a:793) at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:532) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.j ava:288) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:105) at org.apache.tools.ant.Task.perform(Task.java:342) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.ja va:1292) at org.apache.tools.ant.Project.executeTarget(Project.java:1261 ) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(D efaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:114 4) at org.apache.tools.ant.Main.runBuild(Main.java:698) at org.apache.tools.ant.Main.startAnt(Main.java:199) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:298) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=ema il ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. ------------------------------------------------------------ --------- To unsubscribe, e-mail: dev-unsubscribeant.apache.org For additional commands, e-mail: dev-helpant.apache.org
about | contact Other archives ( Real Estate discussion Medical topics )
Mailing lists
Newsgroups
RFC archive