Re: <schedule> - <ant> - <property> - value"${lable}" in property value is not expanded

"Rajib Basu" <[email protected]>
Newsgroups gmane.comp.java.cruise-control.user
Message-ID <DE68DBE83271704E8B6F54B8375A82D8040E691A@WDNCFEXCHCL01.ncf.wdc.com>
Hi Mark,

 

You do not have to explicitely pass <property name="build.label"
value="${label}"/> to the build file.

 

Remove the line "<property name="build.label" value="${label}"/>" and it
will work.

 

Try creating a dummy target with echo <echo>LABEL : ${label}</echo> in your
build script and invoke it by cruisecontrol .It should work

 

Thanks

Rajib

 

 

________________________________

From: Mark Sehorne [mailto:[email protected]] 
Sent: Wednesday, April 01, 2009 3:18 PM
To: [email protected]
Subject: [Cruisecontrol-user] <schedule> - <ant> - <property> -
value"${lable}" in property value is not expanded

 

I have the following:
            <ant antscript="/opt/cc/projects/${project.name
<http://project.name/> }/Build/ant"
                 antworkingdir="/opt/cc/projects/${project.name
<http://project.name/> }/Build">

                <property name="build.label" value="${label}"/>
            </ant>

When the antscript is invoked, instead of getting the actual value of
${label}, I'm getting the string "${label}".  "${label}" is set by the label
incrementer, and the value is passed correctly as -Dlable=some_label_text as
a parameter to the script. However, there apparently is no ${label} actual
variable that will get expanded and is accessible by config.xml , so my
attempt to assign the value to another property is failing.

See this line from the cruisecontrol.log ( echoing "$@" from the first line
of the ant shell script being run ). 
 ( Following line split for readability )

2009-03-31 20:23:17,230 [Thread-107] INFO  ScriptRunner     - 
   -logger net.sourceforge.cruisecontrol.builders.AntProgressLogger 
   -listener org.apache.tools.ant.XmlLogger 
   -DXmlLogger.file=log.xml 
   -lib /opt/cc/lib/cruisecontrol-antprogresslogger.jar 
   -debug 
   -Dlastbuildsuccessful=false 
   -Dlabel=CC-18-INT 
   -Dprojectname=eprj 
   -Dcclastgoodbuildtimestamp=20090330154701 
   -Dcctimestamp=20090331202100 
   -Dbuildforced=true 
   -Dcvstimestamp=2009-04-01 01:21:00 GMT 
   -Dcclastbuildtimestamp=20090330154701 
   -Dbuild.label=${label} 
   -Dsource.dir=/opt/cc/builds/eprj 
   -buildfile build.xml build

Note that the value of ${label} is not expanded, as I had hoped.

My question: 
    Does the label incrementer actually place a ${label} variable in the
cruise control config.xml environment so I can use it like I use
${project.name}?



-- 

Regards,

Mark A Sehorne

------------------------------------------------------------------------------

_______________________________________________
Cruisecontrol-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.