Got the trick .. donno how $1 was in mind .. %1 did all the work .. 

Thanks everyone !

-----Original Message-----
From: Keith Hatton [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 11, 2005 11:03 AM
To: Ant Users List
Subject: RE: passing parameters to ant

Shouldn't the -D... settings go immediately after "ant" and before
"-buildfile ..."?

Keith


-----Original Message-----
From: Radha Sangal [mailto:[EMAIL PROTECTED]
Sent: 11 January 2005 16:01
To: Ant Users List
Subject: RE: passing parameters to ant


Changed command line :
cmd /c ant -buildfile
D:\v04_E\Build_Scripts\CvsDiffReports\automated_cvsdiffs.xml manualDiff
-DDevBuild1=$1  -DDevBuild2=$2 -l D:\test2.txt

<property name="DevBuild1" value="${DevBuild1}"/>
<property name="DevBuild2" value="${DevBuild2}"/>
<echo message="Starting CVS Difference Report (${DevBuild1} to
${DevBuild2})"/>        
                
Output :
manualDiff:
     [echo] Starting CVS Difference Report ($1 to $2)

-----Original Message-----
From: Jeffrey E Care [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 11, 2005 10:45 AM
To: Ant Users List
Subject: Re: passing parameters to ant

1) IIRC there _must not_ be a space betwixt "-D" and the property: i.e. 
your command line should look like this:

    cmd /c ant -buildfile
    D:\v04_E\Build_Scripts\CvsDiffReports\automated_cvsdiffs.xml 
manualDiff
    -DDevBuild1=$1 -DDevBuild2=$2 > D:\test2.txt

2) You might consider using the "-l" option instead of redirecting the 
output.

3) Your stanza <property name="DevBuild1"> value="$(DevBuild1)"/> is 
completely wrong & totally unnecessary if you pass in the parameters 
correctly.

-- 
Jeffrey E. Care ([EMAIL PROTECTED])
WebSphere Build SWAT Team Lead
WebSphere Build Tooling Lead (Project Mantis)
https://w3.opensource.ibm.com/projects/mantis


"Radha Sangal" <[EMAIL PROTECTED]> wrote on 01/11/2005 10:30:50 AM:

> [snip]
> 
> cmd /c ant -buildfile
> D:\v04_E\Build_Scripts\CvsDiffReports\automated_cvsdiffs.xml
manualDiff
> -D DevBuild1=$1  -D DevBuild2=$2 > D:\test2.txt
> 
> 
> 
> ($1 and $2 are passed from the client and are tested to have the right
> value at run time)
> 
> 
> 
> Ant script "automated_cvsdiffs.xml" receiving these parameters:
> 
> <target name="manualDiff">
> 
>                         <!-- TO use manual diff, set the build names
> 
below. This targets DEV build only -->
> 
>                         <property name="DevBuild1"
> value="$(DevBuild1)"/>
> 
>                         <property name="DevBuild2"
> value="$(DevBuild2)"/>
> 
>                         <echo message="Starting CVS Difference Report
> (${DevBuild1} to ${DevBuild2})"/> 
> 
> 
> 
> Output as in test2.txt :
> 
> manualDiff:
> 
>      [echo] Starting CVS Difference Report ($(DevBuild1) to
> $(DevBuild2))

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to