ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeffrey Bacon <jba...@magmic.com>
Subject Re: recursive expansion of property names
Date Thu, 24 Jun 2004 19:33:48 GMT
will that patch work on Ant's 1.6.1 source code it is it specific to 
1.7?  I tried implementing Wascally Wabbit's suggestion from the other 
day and just took the replacePropertiesRecursively from the patch you 
submitted.  I don't really *understand* how the property helper chaining 
stuff works but I THINK that either I'm not getting put in the chain or 
the replacePropertiesRecursively method is not working on regular 
properties.  ${basedir} does not even get resolved -- though I suspect 
that something I'm doing is wrong as that should get resolved BEFORE my 
PropertyHandler is even installed.

FYI. I have attached my various files and below is how I install the 
property handler in an Ant script:


<project name="Magmic BlackBerry Build Script"
          default="help-mini"
          xmlns:magmic="antlib:com.magmic"
          xmlns:contrib="antlib:net.sf.antcontrib"
          xmlns:antenna="http://antenna.sourceforge.net">

   <!-- Install the recursive property handler -->
   <magmic:recursiveproperties action="install" />

.....


OUTPUT:

BUILD FAILED
java.lang.NullPointerException
         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:355)
         at 
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
         at org.apache.tools.ant.Task.perform(Task.java:364)
         at 
org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:65)
         at 
net.sf.antcontrib.logic.ForEach.executeSequential(ForEach.java:178)
         at net.sf.antcontrib.logic.ForEach.execute(ForEach.java:254)
         at 
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
         at org.apache.tools.ant.Task.perform(Task.java:364)
         at org.apache.tools.ant.Target.execute(Target.java:301)
         at org.apache.tools.ant.Target.performTasks(Target.java:328)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
         at org.apache.tools.ant.Main.runBuild(Main.java:632)
         at org.apache.tools.ant.Main.startAnt(Main.java:183)
         at org.apache.tools.ant.Main.start(Main.java:147)
         at org.apache.tools.ant.Main.main(Main.java:230)

Total time: 1 second
java.lang.NullPointerException
         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:355)
         at 
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
         at org.apache.tools.ant.Task.perform(Task.java:364)
         at 
org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:65)
         at 
net.sf.antcontrib.logic.ForEach.executeSequential(ForEach.java:178)
         at net.sf.antcontrib.logic.ForEach.execute(ForEach.java:254)
         at 
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
         at org.apache.tools.ant.Task.perform(Task.java:364)
         at org.apache.tools.ant.Target.execute(Target.java:301)
         at org.apache.tools.ant.Target.performTasks(Target.java:328)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
         at org.apache.tools.ant.Main.runBuild(Main.java:632)
         at org.apache.tools.ant.Main.startAnt(Main.java:183)
         at org.apache.tools.ant.Main.start(Main.java:147)
         at org.apache.tools.ant.Main.main(Main.java:230)
--
Jeffrey Bacon
jbacon@magmic.com
Creative Developer
http://www.magmic.com


Jack J. Woehr wrote:
> Matt Benson wrote:
> 
>  > About three weeks ago there was a discussion on the
>  > dev list about how to allow recursive property
>  > expansion without breaking everything.  So it's on the
>  > radar, but it's not necessarily easy to do (right).
> 
> http://issues.apache.org/bugzilla/show_bug.cgi?id=29347
> 
> I submitted a patch with this that enables recursive property expansion. 
> Matt, can
> you explain aspect of Ant that this would break? I sense there's some 
> "fu" surrounding
> tasks being able to chain property management, but in my few hours 
> coding the patch
> I didn't find any permanent data structures being neglected by the way I 
> short-circuited
> and changed parsing.
> 
> Please excuse me if I missed prior discussion on this or misunderstood it.
> 
> - Jax
> 
> -- 
> Jack J. Woehr      # We have gone from the horse and buggy
> Senior Consultant  # to the moon rocket in one lifetime, but
> Purematrix, Inc.   # there has not been a corresponding moral
> www.purematrix.com # growth in mankind. - Dwight D. Eisenhower
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
View raw message