You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Fabien Crespel (JIRA)" <ji...@codehaus.org> on 2013/09/14 18:44:52 UTC

[jira] (MRRESOURCES-71) Replace properties in file and directory names during resource bundle processing

Fabien Crespel created MRRESOURCES-71:
-----------------------------------------

             Summary: Replace properties in file and directory names during resource bundle processing
                 Key: MRRESOURCES-71
                 URL: https://jira.codehaus.org/browse/MRRESOURCES-71
             Project: Maven Remote Resources Plugin
          Issue Type: Improvement
    Affects Versions: 1.6
            Reporter: Fabien Crespel
            Priority: Minor
         Attachments: ProcessRemoteResourcesMojo.java.patch

To make resource bundles more useful in the context of the project in which they are processed, *property placeholders* in *file and directory names* should be replaced by their value. For example, the resource bundle could contain a directory named {{\_\_artifactId\_\_}}, which would be replaced by the actual artifactId of the project using this bundle as part of the {{process-remote-resources}} goal. My personal use case is for making a Tomcat CATALINA_BASE resource bundle, which I could optionally use in J2EE-based projects for easier "standalone" packaging.

The attached patch adds this simple new feature to {{ProcessRemoteResourcesMojo}}, and is based on the work done in the [archetype plugin|http://grepcode.com/file/repo1.maven.org/maven2/org.apache.maven.archetype/archetype-common/2.2/org/apache/maven/archetype/generator/DefaultFilesetArchetypeGenerator.java#DefaultFilesetArchetypeGenerator.replaceFilenameTokens%28java.lang.String%2Corg.apache.maven.archetype.generator.Context%29]. I have successfully tested it on some of my projects, but haven't made a proper testcase yet (waiting for feedback first).

Please let me know what you think of this and whether it could be included in the current trunk. :)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira