[ http://jira.codehaus.org/browse/MNG-791?page=comments#action_45273 ]
Kenney Westerhof commented on MNG-791: -------------------------------------- What I really like to see is the removal of warSourceDirectory. It should be just a resource directory, specified in a <resource> section, with a different <targetPath> (the exploded war dir, not the WEB-INF/classes dir or even the classes/ dir), or something like that. THe resources plugin should take care of copying it. Here's a nice solution (I think): Add a new mojo to the war plugin and bind it to a pre process-resources phase. That mojo will take care of registering the (still existing) warSource directory as a resource root. When process-resources is up, the resources plugin will pick that directory up and copy it, applying filtering. The problem here is how to specify filtering - we don't want to do that in more than one place, if possible: everything in MNG-788 would be duplicated for the configuration of this mojo then.. So we could specify the warSource directory as in a <resource> section too, where filtering can be specified. It should somehow be marked as being the warSourceDirectory, for instance if the <directory> matches the warSourceDirectory configuration (src/main/webapp). If there are no matches, the new mojo will have created a resource section with default values. If there exists one or more matching resource sections, a problem can be that targetPath is specified - what if it doesn't match the temporary exploded webapp directory in target/ ? If targetPath is not specified, the mojo will set the targetPath to the warSourceDirectory (for matching resource sections!). normal resources go in target/classes, these should go in the exploded webapp root (not in WEB-INF/classes either). Or there might be another, more general way to mark the resource for use of a specific plugin.. > Add resource filtering to war plugin > ------------------------------------ > > Key: MNG-791 > URL: http://jira.codehaus.org/browse/MNG-791 > Project: Maven 2 > Type: Improvement > Components: maven-plugins > Versions: 2.0-beta-1 > Reporter: Mark Hobson > > > I'd like to patch the war plugin to perform resource filtering as per the > resources plugin. This is a trivial patch but would duplicate the following > code from the resources plugin: > PropertyUtils > ReflectionProperties > ResourcesMojo.copyFile(File, File) > These look like handy util methods that could be incorporated into > plexus-utils - what do the developers think? > Also not sure how resource filtering will be affected by MNG-788. -- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
