added a comment - - edited
I can bring more precision.
I have attached an example of the issue. When user-defined propertes are specified, only the first is correctly evaluated (i think it is, but i'm not quite sure ...).
In the example, i ask for two properties : propA and propB. i capitalize these two properties, and use it in two ways : inner use (on text filtering, with $propA for example), and file name filtering. On both, capitalizePropA is correctly evaluated, but capitalizePropB is neither evaluated as propA with capitalizePropA.
Here is the interesting part of the archetype generation log :
Define value for property 'capitalizePropA': $
{propA.substring(0,1).toUpperCase()}${propA.substring(1)}: :
Define value for property 'capitalizePropB': ${propB.substring(0,1).toUpperCase()}${propB.substring(1)}: :
Define value for property 'propA': : valA
Define value for property 'propB': : valB
Confirm properties configuration:
groupId: group
artifactId: art
version: 1.0.0-SNAPSHOT
package: group
capitalizePropA: ${propA.substring(0,1).toUpperCase()}
$
{propA.substring(1)}
capitalizePropB: $
{propB.substring(0,1).toUpperCase()}${propB.substring(1)}
propA: valA
propB: valB
For the moment, all is ok. But velocity complains on the resolution of capitalizePropB on effective generation :
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: test:1
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: group
[INFO] Parameter: artifactId, Value: art
[INFO] Parameter: version, Value: 1.0.0-SNAPSHOT
[INFO] Parameter: package, Value: group
[INFO] Parameter: packageInPathFormat, Value: group
[INFO] Parameter: propA, Value: valA
30 avr. 2012 12:03:34 org.apache.velocity.runtime.log.JdkLogChute log
INFO: FileResourceLoader : adding path '.'
30 avr. 2012 12:03:34 org.apache.velocity.runtime.log.JdkLogChute log
INFO: Null reference
[template 'capitalizePropB', line 1, column 1] : ${propB.substring(0,1).toUpperCase()}
cannot be resolved.
30 avr. 2012 12:03:34 org.apache.velocity.runtime.log.JdkLogChute log
INFO: Null reference [template 'capitalizePropB', line 1, column 38] : $
{propB.substring(1)} cannot be resolved.
[INFO] Parameter: capitalizePropB, Value: ${propB.substring(0,1).toUpperCase()}${propB.substring(1)}
[INFO] Parameter: capitalizePropA, Value: ValA
[INFO] Parameter: package, Value: group
[INFO] Parameter: version, Value: 1.0.0-SNAPSHOT
[INFO] Parameter: groupId, Value: group
[INFO] Parameter: propB, Value: valB
[INFO] Parameter: artifactId, Value: art
[INFO] project created from Archetype in dir: /home/pcbue/test/plop/art
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
ARCHETYPE-383solves the problem for standard properties (artifactId, groupId, ...) but not for user-defined