ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tsm...@netscape.net (Thomas Lionel SMETS)
Subject Is there a limited number of level to variable references in a property file ... ?
Date Tue, 21 Oct 2003 15:12:05 GMT
Here is the problem, I like a project to have the following structure : See below.

Now, my Build.xml (in this case 'TestBuild.xml') always referes to a property-file where most
the properties are defined (One coul have gessed that !)

I seems that I cannot use "variables" in the property file above a certain number... My property
file is as follows : 
[code]
  scr = ${basedir}/source
  a = ${src}/a
  b = ${a}/b
  c = ${b}/c
  d = ${c}/d
  e = ${d}/e
  f = ${e}/f
  g = ${f}/g
[/code]
I, of course, created the directories on the FileSystem.
I seems that I can never show the value of the variable ${src}... Can some one hint me towards
the solution ?

Here is the Build file :
[code]
<?xml version="1.0" encoding="UTF-8"?>

<project name="NimTest" 
         default="echo" 
         basedir="..">

    <property file="./script/Test.properties" />
        
 <target name="echo">
    <echo>
    Shows all the system variables
    *******************************
    basedir = ${basedir}
    src = ${src}
    a = ${a}
    b = ${b}    
    c = ${c}    
    d = ${d}    
    e = ${e}    
    f = ${f}    
    g = ${g}            
    </echo>
 </target>
</project>
[/code]

Outcome of the build is :
[pre]
Arguments: 

    Shows all the system variables
    *******************************
    basedir = C:\Program Files\IBM\WebSphere Studio\workspace\NimTest
    src = ${src}
    a = ${src}/a
    b = ${src}/a/b  
    c = ${src}/a/b/c    
    d = ${src}/a/b/c/d  
    e = ${src}/a/b/c/d/e    
    f = ${src}/a/b/c/d/e/f  
    g = ${src}/a/b/c/d/e/f/g    
[/pre]

Tia,

\T,

C:.
│   .classpath
│   .cvsignore
│   .project
│   .vcm_meta
│
├───build
│
├───config
│   │   log4j.properties
│   │
│   └───CVS
│           Entries
│           Repository
│           Root
│
├───CVS
│       Entries
│       Repository
│       Root
│
├───data
│   │   CloudIds.txt
│   │   TtpIds.txt
│   │
│   └───CVS
│           Entries
│           Repository
│           Root
│
├───lib
│   │   classes12.zip
│   │   junit.jar
│   │   rowset.jar
│   │
│   └───CVS
│           Entries
│           Repository
│           Root
│
├───script
│   │   Test.properties
│   │   TestBuild.xml
│   │
│   └───CVS
│           Entries
│           Repository
│           Root
│
└───source
    └───a
        └───b
            └───c
                └───d
                    └───e
                        └───f
                            └───g

-- 
 
Thomas SMETS 
rue J. Wytsmanstraat 62
1050 Brussels



__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455

Mime
View raw message