Property resolution broken in nested property definition

Alexander Röhnsch <[email protected]>
Newsgroups gmane.comp.java.cruise-control.user
Organization Model Engineering Solutions GmbH
Message-ID <[email protected]>
Hi,

I'm using the Project plugin preconfiguration method as described in the 
wiki (http://confluence.public.thoughtworks.org/display/CC/ConfigFiles).

Apparently, a property given as parameter to a preconfigured project 
instance is not always resolved inside the preconfiguration.

Please see the example below. The <exec> command calls echo by means of 
a windows cmd /c call. Can be changed to a sh call on unix systems.

Couldn't find the issue on the archive. What's your opinion?


Kind Regards,
     Alexander Röhnsch


Example CruiseControl config script:


<?xml version="1.0" encoding="UTF-8"?>
<cruisecontrol>
   <plugin name="project.new" 
classname="net.sourceforge.cruisecontrol.ProjectConfig">

     <!-- Apparently, plugin template parameter properties are neither 
expanded
          in a <plugin> attribute, nor in a <property> attribute. -->
     <property name="broken-parameter-expansion" value="${parameter}"/>

     <!-- Expected output would be:

             Parameter: This is a project parameter string.
             Broken Parameter: This is a project parameter string.

          But it is:

             Parameter: This is a project parameter string.
             Broken Parameter: ${parameter}
     -->
     <schedule interval="600">
       <composite>
         <exec command="cmd" args="/c echo Parameter: ${parameter}"/>
         <exec command="cmd" args="/c echo Broken Parameter: 
${broken-parameter-expansion}"/>
       </composite>
     </schedule>
   </plugin>

   <project.new name="Template Property Demonstration">
     <property name="parameter" value="This is a project parameter 
string."/>
   </project.new>
</cruisecontrol>





------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
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.