[ 
http://jira.codehaus.org/browse/ARCHETYPE-55?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gregory Kick updated ARCHETYPE-55:
----------------------------------

    Attachment: optional-system-properties-v2.diff

This is an update to the previous patch.  Since velocity identifiers can't 
contain periods, accessing things like "user.name" doesn't work.  So, I updated 
it to replace periods with dashes ('.' with '-').

> Maven archetype plugin ignores system properties
> ------------------------------------------------
>
>                 Key: ARCHETYPE-55
>                 URL: http://jira.codehaus.org/browse/ARCHETYPE-55
>             Project: Maven Archetype
>          Issue Type: New Feature
>          Components: Plugin
>    Affects Versions: 1.0-alpha-4
>            Reporter: Ceki Gulcu
>            Priority: Critical
>         Attachments: optional-system-properties-v2.diff, 
> optional-system-properties.diff
>
>
> When it passes a property map to velocity context, the archetype plugin 
> passes the values of the properties basedir, package,
> packageName, groupId, artifactId, and version ignoring other properties, in 
> particular system properties. In the context of our
> project, we would like the archetype plugin to substitute the values of 
> system properties during the file generation based on templates.
> It would take very little effort to add the system properties to the map 
> passed to Velocity context.
> Moreover, only a single file, namely MavenArchetypeMojo.java in 
> maven-archetype-plugin/src/main/java/org/apache/maven/plugin/archetype/
> need to be modified.
> As far as I understand it, the change can be accomplished with a single line 
> of code:
>    map.putAll(System.getProperties());
> Would you consider adding the above line to MavenArchetypeMojo.java?
> Many thanks in advance,

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to