ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angeshwar Deepak <angesh...@yahoo.com>
Subject Re: Recursive Ant and Properties
Date Thu, 09 Sep 2004 14:37:39 GMT
Hi,
 
Why not try using a var in some places. You can find more info here.
http://ant-contrib.sourceforge.net/tasks/index.html
Using this a property can be made set, echoed, unset, then reset.
 
bye,
with regards,
Deepak.

Victor Volle <victor.volle.ml@swissmail.org> wrote:


I have a problem building a big project. The structure is something like 

ROOT
+----A
| +-----A1
| +-----A2
|
+----B
+-----B1
+-----B2

All projects and subprojects import a common build file. The problem starts when a property
(e.g. "foo") is set in a 
project (e.g. "A") that should have a different value in a subproject ("A1"). 

The build files look like:

1: 

2: 


3: 
4:
5: 
6: 
7: ==> X <==
8: 9: .. do something ..
10: 
11: 


I could now either use subant without inheriting any property. Then I can set "foo" in A1
to another value. But I want 
to inherit some properties and I do not want to have a long explicit list of properties that
must be inherited. 

I would prefer to "inherit" all properties but to be able to change the property in "A1".
But when "returning" to "A" 
the values should not be changed, so best would be a sort "scoped" properties for each subant
invocation: 

A --- properties-of-A
| ^
| | 
| |
A1--- properties-of-A1
So if a property is not found in properties-of-A1, properties-of-A should be searched. Setting
of properties should only 
occur in the bottom-most properties. So even if a property "foo" is already defined in properties-of-A
it can be set in 
properties-of-A1. But after it has been defined in A1 it can not be changed anymore as usual.


Perhaps there is a better solution to my problem/requirements? 

I am currently considering of writing my own subant with my own PropertyHelper, but would
prefer a standard solution.

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


		
---------------------------------
Do you Yahoo!?
Shop for Back-to-School deals on Yahoo! Shopping.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message