ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Taner Diler <tan...@riskturk.com>
Subject get Property with java
Date Mon, 22 Aug 2005 11:28:57 GMT
Hi,

I try to get property that in defined in build.xml by using java. How 
can I do that?

build.xml

<...>
    <property name="property_1" value="1"/>
</...>

and java code

        Project ant = new Project();
        ProjectHelper helper = new ProjectHelperImpl();
        ant.init();
        helper.parse(ant, new File(xmlFile));
        String property_1 = ant.getProperty("property_1");

When I run this code, Null is returned by "ant.getProperty("property_1")".



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


Mime
View raw message