ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dick, Brian E." <Brian.D...@FMR.com>
Subject RE: Problem with nested property sets
Date Wed, 18 May 2005 11:35:41 GMT
Here is the output from "ant -debug".

Apache Ant version 1.6.3 compiled on April 28 2005
Buildfile: build.xml
Adding reference: ant.PropertyHelper
Detected Java version: 1.4 in: C:\j2sdk1.4.2_05\jre
Detected OS: Windows XP
Adding reference: ant.ComponentHelper
Setting ro project property: ant.version -> Apache Ant version 1.6.3
compiled on April 28 2005
Setting ro project property: ant.file ->
C:\Projects\DistApp\BBGCalcPriceMonitor\build.xml
Adding reference: ant.projectHelper
Adding reference: ant.parsing.context
Adding reference: ant.targets
parsing buildfile C:\Projects\DistApp\BBGCalcPriceMonitor\build.xml with
URI = file:///C:/Projects/DistApp/BBGCalcPriceMonitor/build.xml
Setting ro project property: ant.project.name -> build
Adding reference: build
Setting ro project property: ant.file.build ->
C:\Projects\DistApp\BBGCalcPriceMonitor\build.xml
Project base dir set to: C:\Projects\DistApp\BBGCalcPriceMonitor
 +Target:
Adding reference: foo.propset
Adding reference: bar.propset
Adding reference: foobar.propset
Setting project property: foo.1 -> 1
Setting project property: foo.2 -> 2
Setting project property: bar.3 -> 3
Setting project property: bar.4 -> 4
Could not load a dependent class
(com/sun/media/jai/codec/FileSeekableStream) for type image
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type
sshexec
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
Adding reference: foo.propset
Could not load a dependent class
(com/sun/media/jai/codec/FileSeekableStream) for type image
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type
sshexec
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
Adding reference: bar.propset
Could not load a dependent class
(com/sun/media/jai/codec/FileSeekableStream) for type image
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type
sshexec
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
Adding reference: foobar.propset
[echoproperties] #Ant properties
[echoproperties] #Wed May 18 07:31:45 EDT 2005
[echoproperties] foobar.2=2
[echoproperties] foobar.1=1
[echoproperties] #Ant properties
[echoproperties] #Wed May 18 07:31:45 EDT 2005
[echoproperties] foobar.4=4
[echoproperties] foobar.3=3

BUILD FAILED
C:\Projects\DistApp\BBGCalcPriceMonitor\build.xml:32:
java.lang.NullPointerException
        at org.apache.tools.ant.Task.perform(Task.java:373)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at
org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:142
)
        at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:9
1)
        at org.apache.tools.ant.Main.runBuild(Main.java:653)
        at org.apache.tools.ant.Main.startAnt(Main.java:187)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java:393)
        at java.util.Properties.setProperty(Properties.java:102)
        at
org.apache.tools.ant.types.PropertySet.getProperties(PropertySet.java:32
2)
        at
org.apache.tools.ant.types.PropertySet.getProperties(PropertySet.java:27
8)
        at
org.apache.tools.ant.taskdefs.optional.EchoProperties.execute(EchoProper
ties.java:267)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        ... 7 more
--- Nested Exception ---
java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java:393)
        at java.util.Properties.setProperty(Properties.java:102)
        at
org.apache.tools.ant.types.PropertySet.getProperties(PropertySet.java:32
2)
        at
org.apache.tools.ant.types.PropertySet.getProperties(PropertySet.java:27
8)
        at
org.apache.tools.ant.taskdefs.optional.EchoProperties.execute(EchoProper
ties.java:267)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at
org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:142
)
        at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:9
1)
        at org.apache.tools.ant.Main.runBuild(Main.java:653)
        at org.apache.tools.ant.Main.startAnt(Main.java:187)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

Total time: 0 seconds


-----Original Message-----
From: Jeffrey E Care [mailto:carej@us.ibm.com] 
Sent: Tuesday, May 17, 2005 4:03 PM
To: Ant Users List
Subject: Re: Problem with nested property sets


Try running in debug mode (-debug) and providing the stack trace.

-- 
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


"Dick, Brian E." <Brian.Dick@FMR.com> wrote on 05/17/2005 12:30:58 PM:

> I'm getting an exception from the following build. The echoproperties
> task doesn't like the nested propertyset. What am I doing wrong?
> 
> <?xml version="1.0" ?>
> <project name="build" default="prop">
>    <property name="foo.1" value="1"/>
>    <property name="foo.2" value="2"/>
> 
>    <property name="bar.3" value="3"/>
>    <property name="bar.4" value="4"/>
> 
>    <propertyset id="foo.propset">
>       <propertyref prefix="foo"/>
>       <mapper type="glob" from="foo.*" to="foobar.*"/>
>    </propertyset>
> 
>    <propertyset id="bar.propset">
>       <propertyref prefix="bar"/>
>       <mapper type="glob" from="bar.*" to="foobar.*"/>
>    </propertyset>
> 
>    <propertyset id="foobar.propset">
>       <propertyset refid="foo.propset"/>
>       <propertyset refid="bar.propset"/>
>    </propertyset>
> 
>    <echoproperties>
>       <propertyset refid="foo.propset"/>
>    </echoproperties>
> 
>    <echoproperties>
>       <propertyset refid="bar.propset"/>
>    </echoproperties>
> 
>    <echoproperties>
>       <propertyset refid="foobar.propset"/>
>    </echoproperties>
> </project>

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


Mime
View raw message