You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Eric Fetzer <el...@yahoo.com> on 2010/07/13 00:05:57 UTC

property passed via ant to build file not being set

OK, I am totally stumped!  I have some behavior that works correctly when I call 
from the command line, but differently when cruise control calls it.  I don't 
understand.  Here's the skinny:

1)  cc calls my build.xml file
2)  my build file calls another build file
3)  the other build file calls another build file like this:

      <echo>The label I'm going to pass is ${st.label}</echo>
      <ant antfile="${dir.webmethods}/IntegrationServer/build/jcode.xml" 
dir="${dir.webmethods}/IntegrationServer/build" 
output="${log.webmethods.jcode}">
        <property name="label" value="${st.label}"/>
        <property name="checkoutbylabel" value="true"/>
        <property name="include.nwcg_adapter_connections" 
value="${include.nwcg_adapter_connections}"/>
      </ant>

4) note that the echo statement produces the correct label
5) the first thing the jcode.xml file puts out is a echo:

    <echo message="label is ${label}"/>

6) and label is set to "build.1"


Now when this exact same build process is called directly from ant rather than 
cc, label is correct in jcode.xml.  Anybody have any clue what's going on here.

Thanks,
Eric


      

AW: property passed via ant to build file not being set

Posted by "Knuplesch, Juergen" <Ju...@icongmbh.de>.
Hello Eric,

looks really strange!

What is the value of label in the wrong case?

Do both tests use the same versions of your buildfiles?
(I echo the CVS version of my buildfiles)

Maybe label is set by cc to the value ${label}, so {label} is not an indicator that label is not set, but 
the value is exactly ${label}. This happens when you use ant or antcall and set values to unset properties. 
But you overwrite label...

${dir.webmethods} - is this property set correctly inside cc?
Otherwise you call a different ant file.

Regards Juergen

-----Ursprüngliche Nachricht-----
Von: Eric Fetzer [mailto:elstonkers@yahoo.com] 
Gesendet: Dienstag, 13. Juli 2010 00:06
An: Ant Users
Betreff: property passed via ant to build file not being set

OK, I am totally stumped!  I have some behavior that works correctly when I call 
from the command line, but differently when cruise control calls it.  I don't 
understand.  Here's the skinny:

1)  cc calls my build.xml file
2)  my build file calls another build file
3)  the other build file calls another build file like this:

      <echo>The label I'm going to pass is ${st.label}</echo>
      <ant antfile="${dir.webmethods}/IntegrationServer/build/jcode.xml" 
dir="${dir.webmethods}/IntegrationServer/build" 
output="${log.webmethods.jcode}">
        <property name="label" value="${st.label}"/>
        <property name="checkoutbylabel" value="true"/>
        <property name="include.nwcg_adapter_connections" 
value="${include.nwcg_adapter_connections}"/>
      </ant>

4) note that the echo statement produces the correct label
5) the first thing the jcode.xml file puts out is a echo:

    <echo message="label is ${label}"/>

6) and label is set to "build.1"


Now when this exact same build process is called directly from ant rather than 
cc, label is correct in jcode.xml.  Anybody have any clue what's going on here.

Thanks,
Eric


      

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


RE: property passed via ant to build file not being set

Posted by "John W. Lewis" <Jo...@sas.com>.
I am not clear on what you want.  Are you wanting the label to be build.1 or not?

Cc by design sets a property called label.  From http://cruisecontrol.sourceforge.net/main/configxml.html:

The default label incrementer (<labelincrementer>) uses the format string.number, providing the initial default label of build.1.



-----Original Message-----
From: Eric Fetzer [mailto:elstonkers@yahoo.com] 
Sent: Monday, July 12, 2010 6:06 PM
To: Ant Users
Subject: property passed via ant to build file not being set

OK, I am totally stumped!  I have some behavior that works correctly when I call 
from the command line, but differently when cruise control calls it.  I don't 
understand.  Here's the skinny:

1)  cc calls my build.xml file
2)  my build file calls another build file
3)  the other build file calls another build file like this:

      <echo>The label I'm going to pass is ${st.label}</echo>
      <ant antfile="${dir.webmethods}/IntegrationServer/build/jcode.xml" 
dir="${dir.webmethods}/IntegrationServer/build" 
output="${log.webmethods.jcode}">
        <property name="label" value="${st.label}"/>
        <property name="checkoutbylabel" value="true"/>
        <property name="include.nwcg_adapter_connections" 
value="${include.nwcg_adapter_connections}"/>
      </ant>

4) note that the echo statement produces the correct label
5) the first thing the jcode.xml file puts out is a echo:

    <echo message="label is ${label}"/>

6) and label is set to "build.1"


Now when this exact same build process is called directly from ant rather than 
cc, label is correct in jcode.xml.  Anybody have any clue what's going on here.

Thanks,
Eric


      

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