ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alain ROY <armaill...@free.com>
Subject Re: Problem with import using property file
Date Wed, 09 Jan 2008 12:13:03 GMT
Like this it works ...

build-common.xml
----------------
<project name="build-common" default="init" basedir=".">

   <property name="root.dir" location="${basedir}" />
   <property file="${root.dir}/build.properties" />

   <target name="init">
      <echo message="${devenv.home}"/>
   </target>
   
</project>


buildC.xml
----------
<project name="buildC" default="dist" basedir=".">

   <property name="root.dir" location="../.." />
   <import file="${root.dir}/build-common.xml"/>

   <target name="dist">
      <echo message="devenv.home = ${devenv.home}"/>
   </target>

</project>

Regards
AR

On Mon, 7 Jan 2008 18:46:22 -0500
"Nilesh Sharma" <sharma.nilesh@gmail.com> wrote:

> Guys,
> 
> I am facing a l,ittle problem with the ant build. Here is the problem
> description:
> I am having three folders:
> 
> A
> 
> ->B
> 
>                     -> C
> 
> folder A contains B and B contains C
> 
> A also contains:
> 
> base.properties
> 
> build-common.xml
> 
> build-common.xml calls buildA.properties inside and able to access all the
> properties defined in property file
> 
> 
> C contains:
> 
>           buildC.xml
> 
> "buildC.xml" imports "build-common.xml" but I am not able to access the
> properties defiend in the  base.properties file.
> 
> *base.properties*
> 
> devenv.home=C:/dev
> 
> *build-common.xml*
> 
> <project name="build-common" default="Init" basedir=".">
> 
>       <property file="${basedir}/build.properties" />
> 
>       <property name="devenv.home" location="${devenv.home}" />
> 
>           <echo message="${devenv.home}"/> *(this works fine)*
> 
> *buildC.xml*
> 
> <project name="buildC " default="dist">
> 
> <property name="root.dir" location="../.." />
> 
>       <import file="${root.dir}/build-common.xml"/>
> 
>           <echo message="${devenv.home}"/> *(Problem)*
> Any Idea?
> 
> Thanks
> 
> 
> Nilesh Sharma
> 


-- 
Alain ROY <armaillist@free.com>

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


Mime
View raw message