You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Gregory Kick (JIRA)" <ji...@codehaus.org> on 2007/02/21 09:12:27 UTC

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

     [ 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.diff

This is a quick patch for the optional inclusion of system properties as Ceki described it.  It is working quite well for me.

To avoid the whole problem with embedded maven, it might be a good idea to dependency inject a Properties called additionalProperties or something that could default to System.getProperties().

> 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.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