You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Andrew Waterman (JIRA)" <ji...@codehaus.org> on 2007/11/19 23:43:40 UTC

[jira] Commented: (ARCHETYPE-55) Maven archetype plugin ignores system properties

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

Andrew Waterman commented on ARCHETYPE-55:
------------------------------------------

It would definitely be nice to be able to add custom properties into the velocity templating system.  I may have to write a mini plugin to do this work for me, as the archetype is missing this needed functionality.

> 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