RE: Setting property values programatically

2001-12-17 Thread Ext-Mike . Hogan

No, thats not what I want to do.  I COULD do that (assuming the properties
are loaded at read time and not at ant start time).

Anyway, I now see that outputproperty is what I need.

Thanks a mil,
Mike.

 -Original Message-
 From: ext Erik Hatcher [mailto:[EMAIL PROTECTED]]
 Sent: 17. December 2001 14:38
 To: Ant Users List
 Subject: Re: Setting property values programatically
 
 
 You just want to load a properties file that was just updated with
 propertyfile, right?  Why not use property file=./
 
 
 - Original Message -
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Monday, December 17, 2001 7:04 AM
 Subject: RE: Setting property values programatically
 
 
  outputproperty on the exec task right?  Just found it now 
 - silly me.
 
   -Original Message-
   From: Hogan Mike (EXT-IBM/Espoo)
   Sent: 17. December 2001 13:58
   To: '[EMAIL PROTECTED]'
   Subject: RE: Setting property values programatically
  
  
  
  
Dirk,
   
 What do you mean be setting a property programmatically
 exactly? Please
 elaborate.
   
I'm working with Clearcase.  I have several branches.  Each
branch represents a particular release of my system.  Lets
assume my system is called The Special Acme Project.
Currently I'm supporting versions 4.0 and 3.1.1 of this
project.  So I have two branches.  Each branch has the
version it represents burned into it as meta data.  So, I can
ask any branch, using a command line, what version it
represents - 4.0 or 3.1.1.
   
Now, my goal is to have a single build.xml file that can
produce a binary release of the system for me, regardless of
what branch it runs on.  And I want to burn a version string
into the binary release, where the version string has the
following form:
   
The Special Acme Project - version 4.0 (build 345)  or
The Special Acme Project - version 3.1.1 (build 1694).
   
If I was generating this version string using a shell script,
I'd use the execute quotes to capture the result of a command
line into a variable, as follows:
   
set PROJECT=The Special Acme Project
set VERSION=`get metadata for current branch from clearcase
command line`
set BUILD_NO=`compute build number command line`
   
You've shown me how to do the build number piece.  But now
how do I do the version piece i.e. run an external command
line and capture the result of it into a property.
   
Many thanks,
Mike.
  
 
  --
  To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

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




Re: setting property

2001-12-03 Thread Diane Holt

--- Erik Hatcher [EMAIL PROTECTED] wrote:
 property environment=env /
 property name=env.PROJECT_HOME value=c:\project/
 property name=project.home value=env.PROJECT_HOME/
   
Actually, you'll want that to be value=${env.PROJECT_HOME}.
 
Diane

=
([EMAIL PROTECTED])



__
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com

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




Re: setting property

2001-11-30 Thread Erik Hatcher

Would you mind sharing a bit more of the specific scenario and problem
you're trying to solve with this request?  Perhaps there are other ways of
accomplishing what you're after.


- Original Message -
From: Vishweshwar, Ghanakota [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, November 30, 2001 3:51 PM
Subject: setting property


 Hi All,
 Is there anyway to set a global property (not thru' -D) only if an
 environment variable is not set? I can't use condition since it's not
 child of project.

 thanks,
 vishu

 MMS firstam.com made the following
  annotations on 11/30/01 12:52:02
 --

 THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED
SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN
CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION.  IF YOU ARE NOT THE
ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR DELIVERY OF THIS
MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR DISTRIBUTE THIS
MESSAGE OR ANY FILES TRANSMITTED HEREWITH.  IF YOU RECEIVE THIS MESSAGE IN
ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE THIS MESSAGE AND
ALL COPIES OF IT FROM YOUR SYSTEM.



==


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




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




Re: setting property

2001-11-30 Thread Erik Hatcher

property environment=env /
property name=env.PROJECT_HOME value=c:\project/
property name=project.home value=env.PROJECT_HOME/

because of property immutability, if it gets set with the environment (1st
line above) then it won't get set with the 2nd line.  The 3rd line just puts
it into a cleaner name - although you could stick with env.PROJECT_HOME
instead of project.home.

Ain't that better?!  :)

Erik



- Original Message -
From: Vishweshwar, Ghanakota [EMAIL PROTECTED]
To: 'Ant Users List' [EMAIL PROTECTED]
Sent: Friday, November 30, 2001 7:48 PM
Subject: RE: setting property


 Here is the scenario:
 I am defining global properties for my project in a separate file, which I
 will include in the individual build files using external entities in XML.
 I also want to give the flexibility of overriding these values thru'
 environment variables.
 something like this:
 property environment=env /
 property name=project.home value=c:\project
 unless=${env.PROJECT_HOME} /

 sorry for not being descriptive enough in the first mail!

 thanks,
 vishu

  -Original Message-
  From: Erik Hatcher [mailto:[EMAIL PROTECTED]]
  Sent: Friday, November 30, 2001 4:30 PM
  To: Ant Users List
  Subject: Re: setting property
 
 
  Would you mind sharing a bit more of the specific scenario and problem
  you're trying to solve with this request?  Perhaps there are
  other ways of
  accomplishing what you're after.
 
 
  - Original Message -
  From: Vishweshwar, Ghanakota [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Friday, November 30, 2001 3:51 PM
  Subject: setting property
 
 
   Hi All,
   Is there anyway to set a global property (not thru' -D) only if an
   environment variable is not set? I can't use condition
  since it's not
   child of project.
  
   thanks,
   vishu
  
   MMS firstam.com made the following
annotations on 11/30/01 12:52:02
  
  --
  
  
   THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH,
  ARE INTENDED
  SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN
  CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION.  IF YOU
  ARE NOT THE
  ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR
  DELIVERY OF THIS
  MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR
  DISTRIBUTE THIS
  MESSAGE OR ANY FILES TRANSMITTED HEREWITH.  IF YOU RECEIVE
  THIS MESSAGE IN
  ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE
  THIS MESSAGE AND
  ALL COPIES OF IT FROM YOUR SYSTEM.
  
  
  ==
  ==
  ==
  
  
   --
   To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
 
 


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


 MMS firstam.com made the following
  annotations on 11/30/01 16:49:12
 --

 THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED
SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN
CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION.  IF YOU ARE NOT THE
ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR DELIVERY OF THIS
MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR DISTRIBUTE THIS
MESSAGE OR ANY FILES TRANSMITTED HEREWITH.  IF YOU RECEIVE THIS MESSAGE IN
ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE THIS MESSAGE AND
ALL COPIES OF IT FROM YOUR SYSTEM.



==


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




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




Re: Setting property depend of other properties

2001-11-14 Thread Stefan Bodewig

On Tue, 13 Nov 2001, Diane Holt [EMAIL PROTECTED] wrote:

 Thanks for pointing out the simpler approach,

Even if it is simpler, it is unintuitive and difficult to understand
by the uninitiated (same holds true for your first version).
Furthermore, both our versions will result in build failures in Ant2
if any one of the three properties happens to be not-set - so using
the isset condition is the way to go in Ant 1.5+.

Stefan

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




Re: Setting property depend of other properties

2001-11-13 Thread Diane Holt

--- Holger Danske [EMAIL PROTECTED] wrote:
 I want to set a new property depend on others
 properties, something like:
 
 condition name=newproperty
   and
 available _property_A 
 available _property_B 
 available _property_c 
   /and
 /condition
 
 Does anybody have an idea.

If you can use a nightly build, there's a new condition, isset, you can
use to check if a property is set. If you need to use a release (ie., 1.4
or 1.4.1), you can use the approach I offered awhile back, setting a
check property for each property you're checking for being set -- for
example:

  target name=setNewproperty
property name=chkpropA value=$${propA}/
property name=chkpropB value=$${propB}/
property name=chkpropC value=$${propC}/
condition property=newproperty
  not
or
  equals arg1=${propA} arg2=${chkpropA}/
  equals arg1=${propB} arg2=${chkpropB}/
  equals arg1=${propC} arg2=${chkpropC}/
/or
  /not
/condition
  /target

newproperty will get set only if propA, propB, and propC are all
set.

Diane

=
([EMAIL PROTECTED])



__
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

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




Re: Setting property depend of other properties

2001-11-13 Thread Stefan Bodewig

On Tue, 13 Nov 2001, Diane Holt [EMAIL PROTECTED] wrote:

   target name=setNewproperty
 property name=chkpropA value=$${propA}/
 property name=chkpropB value=$${propB}/
 property name=chkpropC value=$${propC}/
 condition property=newproperty
   not
 or
   equals arg1=${propA} arg2=${chkpropA}/
   equals arg1=${propB} arg2=${chkpropB}/
   equals arg1=${propC} arg2=${chkpropC}/
 /or
   /not
 /condition
   /target

Doesn't this

   condition property=newproperty
 not
   or
 equals arg1=${propA} arg2=$${propA}/
 equals arg1=${propB} arg2=$${propB}/
 equals arg1=${propC} arg2=$${propC}/
   /or
 /not
   /condition

do the same?

Stefan

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




Re: Setting property depend of other properties

2001-11-13 Thread Diane Holt

--- Stefan Bodewig [EMAIL PROTECTED] wrote:
 Doesn't this
 
condition property=newproperty
  not
or
  equals arg1=${propA} arg2=$${propA}/
  equals arg1=${propB} arg2=$${propB}/
  equals arg1=${propC} arg2=$${propC}/
/or
  /not
/condition
 
 do the same?

Indeed it does... not sure why my brain got stuck on the idea that you
needed to wrap the ${propname} construct in a property of its own --
maybe I should switch back from decaf to real coffee :)

Thanks for pointing out the simpler approach,
Diane

=
([EMAIL PROTECTED])



__
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

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