ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 46117] New: Append property prefix to entries in property file values
Date Wed, 29 Oct 2008 08:57:29 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=46117

           Summary: Append property prefix to entries in property file
                    values
           Product: Ant
           Version: 1.7.1
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: notifications@ant.apache.org
        ReportedBy: remie@backbase.com


This enhancement request is based on the use case of depending products and
re-using property files.

Picture a scenario in which you have product A and product B. Both have
property files (A.properties and B.properties):

[A.properties]
product.name=Product A
product.version=1.0.0
product.publish.dir=c:\publish\${product.name}\${product.version}
product.publish.file=${product.publish.dir}/${product.name}.${product.version}.zip

[B.properties]
product.name=Product B
product.version=1.0.1
product.publish.dir=c:\publish\${product.name}\${product.version}
product.publish.file=${product.publish.dir}/${product.name}.${product.version}.zip

Now let's say product B has a dependency on product A. It needs to consume
files that are placed in the publish directory of product A.

So we include the property file of product A and prefix it with "A". This means
we can have access to the product.publish.dir value using:
${A.product.publish.dir}

The problem is that ${A.product.publish.dir} uses the ${product.name} and
${product.version}. So in the following scenario:

<property file="B.properties" />
<property file="A.properties" prefix="A" />

The value of ${A.product.publish.dir} is actually

c:\publish\Product B\1.0.1\

It would be nice if it is possible to also prefix all properties that are used
within the property file. This would make the use of the prefix attribute more
compelling.

Of course there are workarounds to this situation:
A) have the prefix by design
B) copy and manipulate the property file using replace.

Therefore it should be considered as an enhancement.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message