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 3693] New: - project instance variable is null using custom task
Date Tue, 18 Sep 2001 16:43:02 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=3693>.
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=3693

           Summary: project instance variable is null using custom task
           Product: Ant
           Version: 1.4
          Platform: PC
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Other
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: dan@dantanner.com


My custom task works in Ant 1.3.
It doesn't in Ant 1.4.
I didn't see anything in the release notes that indicate my custom task isn't 
compliant anymore.

Here's some info...I can provide more detail if necessary.

Piece of build.xml in question:
---------------------------------------------------------
     <translationcheck logfile="build/TranslationCheck-AllFiles.log" 
reportfor="entireset">
       <keyset>
         <fileset dir="resources/translations"
 
includes="base.properties,lang1.properties,mtg1.properties" />
       </keyset>
       <searchset>
         <fileset dir="web/user" includes="**/*.jsp" />
         <fileset dir="source" includes="**/*.java" />
         <ignore key="revision.mtg" />
         <ignore key="revision.lang" />
         <ignore key="revision.base" />
         <ignore key="jsp.httperrorpage.errormsg.404" />
       </searchset>
     </translationcheck>
----------------------------------------------------------


Small piece of my custom task: (I think it's my code's point of entry 
into Ant)
------------------------------------------------------------------------
     FileSet fs = (FileSet)filesets.get(i);
     DirectoryScanner ds = fs.getDirectoryScanner(project);
----------------------------------------------------------



Part of Ant output with debug turned on:
------------------------------------------------------------------------
    +Task: translationcheck
Finding class com.katun.kolc.ant.TranslationCheck$SearchSet
Class com.katun.kolc.ant.TranslationCheck$SearchSet loaded from ant loader
Finding class com.katun.kolc.ant.TranslationCheck$KeySet
Class com.katun.kolc.ant.TranslationCheck$KeySet loaded from ant loader
Class java.lang.String loaded from parent loader
Class java.util.List loaded from parent loader
Class java.util.ArrayList loaded from parent loader
Class org.apache.tools.ant.types.FileSet loaded from parent loader

BUILD FAILED

java.lang.NullPointerException
         at 
org.apache.tools.ant.ProjectHelper.configure(ProjectHelper.java:651)
         at 
org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfig
urable.java:143)
         at org.apache.tools.ant.Task.maybeConfigure(Task.java:178)
         at 
org.apache.tools.ant.UnknownElement.handleChildren(UnknownElement.jav
a:139)
         at 
org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.jav
a:88)
         at org.apache.tools.ant.Task.perform(Task.java:216)
         at org.apache.tools.ant.Target.execute(Target.java:164)
         at org.apache.tools.ant.Target.performTasks(Target.java:182)
         at org.apache.tools.ant.Project.executeTarget(Project.java:601)
         at org.apache.tools.ant.Project.executeTargets(Project.java:560)
         at org.apache.tools.ant.Main.runBuild(Main.java:454)
         at org.apache.tools.ant.Main.start(Main.java:153)
         at org.apache.tools.ant.Main.main(Main.java:176)
--------------------------------------------------------

Mime
View raw message