Bug 23278 - Project.setName() does not replaceProperties()
Summary: Project.setName() does not replaceProperties()
Status: UNCONFIRMED
Alias: None
Product: Ant
Classification: Unclassified
Component: Core (show other bugs)
Version: 1.5
Hardware: All other
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-19 17:28 UTC by Greg R. Broderick
Modified: 2018-02-03 17:54 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Greg R. Broderick 2003-09-19 17:28:16 UTC
Scenario:  pass ant commandline parameter "-propertyfile <filename>"

property file contains:
foo = bar

build.xml
<project name="${foo}" default="baz">

At the time that Project.setName() is invoked by ProjectHelperImpl, the project's properties hashtable has already been initialized and the specified propertyfile has been loaded.

Despite this, the project name property contains "${foo}" instead of "bar", as it would, if Project.replaceProperties() was called.

Query: should this also be applied to Project.setDefault() as well?
Comment 1 Stefan Bodewig 2003-09-22 15:24:19 UTC
There are certain attributes that don't get properties expanded.  In particular,
the attributes of target and project do not get expanded.

At least in the case of <target>, this is intended.
Comment 2 Conor MacNeill 2003-09-24 15:08:56 UTC
I'd day it is intended for <project> as well. I don't think the project name 
should be controlled through a property. What would be the usecase for that?
Comment 3 Aal maho 2018-02-03 17:54:45 UTC
Freedem