ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brown, Michael (Denver)" <Michael_Br...@jdedwards.com>
Subject RE: Help : Properties in For- Each Task
Date Fri, 03 Oct 2003 15:56:14 GMT
Sorry for the late reply.  You may have tried this, but you can set
these like this:

<?xml version="1.0"?>
	<project name="Checkout" basedir="." default="run-it">
	<property file="autocheckout.properties"/>
	<property name="cvsdestin" value="cool"/>	
	
		<target name="init">
			<echo message="${cvsdestin}/>
		</target>
Hope this helps and is what you were looking for.

Mike B.


-----Original Message-----
From: Vikas Phonsa [mailto:VPhonsa@suz.com] 
Sent: Thursday, October 02, 2003 5:56 PM
To: 'Ant Users List'
Subject: RE: Help : Properties in For- Each Task

Mike,
Thanks for replying, I'm not sure what exactly you mean by moving them
to
project level. They have to be in a target, right ?

Vikas

-----Original Message-----
From: Brown, Michael (Denver) [mailto:Michael_Brown@jdedwards.com] 
Sent: Thursday, October 02, 2003 3:05 PM
To: Ant Users List
Subject: RE: Help : Properties in For- Each Task

My suggestion would be to move these two:

                <property file="autocheckout.properties"/>
               <property name="cvsdestin" value="cool"/>	
up to the project level.  I think that would solve the problem.

Mike B.

-----Original Message-----
From: Vikas Phonsa [mailto:VPhonsa@suz.com] 
Sent: Thursday, October 02, 2003 3:56 PM
To: 'Ant Users List'
Subject: Help : Properties in For- Each Task

Hi,

In my build file I'm setting a property named cvsdestin in the default
target. Then I'm using the for-each task of ant-contrib to call other
targets.

<property name="cvsdestin" value="cool"/>

If I echo out the value of ${cvsdestin} in the first target (check1)
called
thru foreach then it prints "cool".

Now check1 target calls another target named check2 thru foreach and if
I
echo ${cvsdestin} in check2 I just get "${cvsdestin}" and not "cool".

Everything else is working fine. 

Any ideas ??



    <target name="main">
                <property file="autocheckout.properties"/>
               <property name="cvsdestin" value="cool"/>	
        <foreach list="${name.list}" delimiter="," param="name"
target="check1" inheritall="true"/>
    </target>

    <target name="check1">
        <!-- Get the properties ${name}.* -->
        <propertycopy name="root" from="${name}.root" silent="true"/>
        <propertycopy name="dest" from="${name}.checkoutdir"
silent="true"/>
	<property name="cvsdest" value="cool"/>       
        
        <echo> root = ${root} </echo>
        <echo> dest = ${dest} </echo>
	 <echo> cvsdestin = ${cvsdestin} </echo>
	

<foreach target="check2" param="check2.name">
      <path>
        <dirset dir="${root}" includes="*"/>
      </path>
    </foreach>
    </target>

 <target name="check2">              
        <echo> cvsroot = ${check2.name} </echo>
	 <echo> cvsdestyyyy = ${cvsdestin} </echo>  
	
    </target>


Thanks

Vikas PHonsa

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


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

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


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


Mime
View raw message