Bug 23278

Summary: Project.setName() does not replaceProperties()
Product: Ant Reporter: Greg R. Broderick <gregb+apachebug>
Component: CoreAssignee: Ant Notifications List <notifications>
Status: UNCONFIRMED ---    
Severity: enhancement    
Priority: P3    
Version: 1.5   
Target Milestone: ---   
Hardware: All   
OS: other   

Description Greg R. Broderick 2003-09-19 17:28:16 UTC
Scenario:  pass ant commandline parameter "-propertyfile <filename>"

property file contains:
foo = bar

<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