ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 25606] New: - checksum doesn't work when todir is set and totalproperty is not
Date Thu, 18 Dec 2003 00:19:59 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25606>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25606

checksum doesn't work when todir is set and totalproperty is not

           Summary: checksum doesn't work when todir is set and
                    totalproperty is not
           Product: Ant
           Version: 1.6Beta
          Platform: Sun
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: abackenr@interwoven.com


basically, if you have
<checksum todir="${output}">
  <filset dir="src">
    <exclude name="**/*.MD5"/>
  </fileset>
</checksum>

you will get this exception:

java.lang.NullPointerException
        at java.io.File.<init>(File.java:258)
        at org.apache.tools.ant.taskdefs.Checksum.getChecksumFile(Checksum.java:445)
        at
org.apache.tools.ant.taskdefs.Checksum.addToIncludeFileMap(Checksum.java:405)
        at
org.apache.tools.ant.taskdefs.Checksum.validateAndExecute(Checksum.java:384)
        at org.apache.tools.ant.taskdefs.Checksum.execute(Checksum.java:263)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:306)
        at org.apache.tools.ant.Task.perform(Task.java:401)
        at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:102)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:306)
        at org.apache.tools.ant.Task.perform(Task.java:401)
        at
org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:346)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:306)
        at org.apache.tools.ant.Task.perform(Task.java:401)
        at org.apache.tools.ant.Target.execute(Target.java:338)
        at org.apache.tools.ant.Target.performTasks(Target.java:365)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1237)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1094)
        at org.apache.tools.ant.Main.runBuild(Main.java:669)
        at org.apache.tools.ant.Main.startAnt(Main.java:220)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:215)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:90)

this is because relativeFilePaths is not getting populated, unless totalProperty
!= null.  

modifying line 337 to: if (totalproperty != null || todir != null) {  // the
todir != null part is new

populates the relativeFilePaths map, and things run smoothly.

thanks for the feature by the way of specifying todir! very usefull!

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message