ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeffrey E Care <ca...@us.ibm.com>
Subject Re: Problems with task uptodate
Date Thu, 03 Mar 2005 19:40:25 GMT
I don't see you setting @from; that is probably the problem.

-- 
Jeffrey E. Care (carej@us.ibm.com)
WebSphere Build SWAT Team Lead
WebSphere Build Tooling Lead (Project Mantis)
https://w3.opensource.ibm.com/projects/mantis




dbrosius@qis.net 
03/03/2005 02:26 PM
Please respond to
"Ant Users List"


To
user@ant.apache.org
cc

Subject
Problems with task uptodate






I am using 1.6.2 on windows xp w/1.4.2_06

I generate java files from xml files, and only want to do this if the xml 
files
have changed. Task udtodate seemed what i wanted. The base xml and java 
files
names match, so i tried

<target name="check_schema_uptodate" description="checks to see if the 
schema
files need to be regenerated">
        <uptodate property="schema.uptodate">
                      <srcfiles dir="${dir.source.schema}" 
includes="*.xml" />
                      <mapper type="glob" to="../../foo/*.java"/>
            </uptodate>
</target>


I am getting a Null Pointer exception:

java.lang.NullPointerException
        at
org.apache.tools.ant.util.GlobPatternMapper.setFrom(GlobPatternMapper.java:68)
        at 
org.apache.tools.ant.types.Mapper.getImplementation(Mapper.java:205)
        at 
org.apache.tools.ant.taskdefs.UpToDate.scanDir(UpToDate.java:210)
        at org.apache.tools.ant.taskdefs.UpToDate.eval(UpToDate.java:158)
        at 
org.apache.tools.ant.taskdefs.UpToDate.execute(UpToDate.java:187)

Unfortunately the cvs version doesn't seem to match the 1.6.2 version, but
looking at setFrom, it seems the only possible NPE would be if the 
parameter
(from) was null. 

public void setFrom(String from) {
        int index = from.lastIndexOf("*");

I use the variable ${dir.source.schema} in the same target as this code, 
and it
is fine for the other use. Any ideas?

Thanks!



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



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message