Hello, 

I'm writing a java application that call ant.
It works fine.
But I want to get project properties defined in the build.xml file.

With project.getUserProperty("serverName");
or   project.getProperty("serverName");
I get a returned null value.

----------------------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="InitialProject" basedir="." default="clear">
            <property name="serverName"     value="localhost"/>


Project project= new Project();
ProjectHelper helper = new ProjectHelperImpl();
project.init();
helper.parse(antProject, new File("build.xml"));

project.getUserProperty("serverName");

----------------------------------------------------------------
Cheers

Reply via email to