[jira] Commented: (MWAR-12) Add resource filtering to war plugin
[ http://jira.codehaus.org/browse/MWAR-12?page=comments#action_60182 ] Brett Porter commented on MWAR-12: -- Scott, IIUC your solution will only work for WARs, and will break resources for JARs. We agreed on dev@maven.apache.org that classpath resources and webapp resources are different, which would be confused if the resources plugin were duplicated. Brian's patch is closest to the correct solution (we can avoid the need for the implementation attribute), and the filtering/resource code needs to be in a library shared by the resources plugin and the war plugin (I'm not sure if this is the case in here or not). I'll try and find some cycles to apply this. Add resource filtering to war plugin Key: MWAR-12 URL: http://jira.codehaus.org/browse/MWAR-12 Project: Maven 2.x War Plugin Type: Improvement Reporter: Mark Hobson Assignee: Brett Porter Attachments: AbstractWarMojo.patch, MWAR-12.patch, ResourcesMojo.patch, test.zip Original Estimate: 15 minutes Remaining: 15 minutes 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]
[jira] Updated: (MWAR-12) Add resource filtering to war plugin
[ http://jira.codehaus.org/browse/MWAR-12?page=all ] Scott Tavares updated MWAR-12: -- Attachment: AbstractWarMojo.patch ResourcesMojo.patch Add resource filtering to war plugin Key: MWAR-12 URL: http://jira.codehaus.org/browse/MWAR-12 Project: Maven 2.x War Plugin Type: Improvement Reporter: Mark Hobson Assignee: Brett Porter Attachments: AbstractWarMojo.patch, MWAR-12.patch, ResourcesMojo.patch, test.zip Original Estimate: 15 minutes Remaining: 15 minutes 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]
[jira] Commented: (MWAR-12) Add resource filtering to war plugin
[ http://jira.codehaus.org/browse/MWAR-12?page=comments#action_59421 ] Kris Nuttycombe commented on MWAR-12: - I like the look of Brian's patch, but one thing I noticed when I attempted to use it is that there's a possible NullPointerException if the path to the filter file is incorrectly specified. Here's the diff to fix it: --- AbstractWarMojo.java.old2006-02-24 09:39:23.0 -0700 +++ AbstractWarMojo.java2006-02-24 09:46:13.0 -0700 @@ -409,10 +409,13 @@ for ( Iterator i = filters.iterator(); i.hasNext(); ) { -String filtersfile = (String) i.next(); +String fname = (String) i.next(); +if (fname == null) throw new MojoExecutionException(Null filter file specified.); -Properties properties = PropertyUtils.loadProperties(new File(filtersfile)); +File filtersFile = new File(fname); +if (!filtersFile.exists()) throw new MojoExecutionException(Unable to find filters file + fname); +Properties properties = PropertyUtils.loadProperties(filtersFile); filterProperties.putAll(properties); } } Add resource filtering to war plugin Key: MWAR-12 URL: http://jira.codehaus.org/browse/MWAR-12 Project: Maven 2.x War Plugin Type: Improvement Reporter: Mark Hobson Assignee: Brett Porter Attachments: MWAR-12.patch, test.zip Original Estimate: 15 minutes Remaining: 15 minutes 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]
Resource Filtering for War Plugin
Hi folks, I've been working on web resource filtering with the war plugin and came across a consideration I'd like to ask of the group. What do you think of the term resources in the context of a war? To me, resources in the POM should be considered anything including the webapp resources, not just classpath resources. I see this because classpath resources could easily be added to $ {warSourceDirectory}/WEB-INF/classes and used from there. In this manner, ${warSourceDirectory} could be filtered with the same constructions people are used to with the resources plugin. This is the way I initially expected things to work. Brett felt otherwise when I talked to him on IRC, but he also said he doesn't do filtering with webapp content and I ought to ask people who care a little bit more about this subject. OPTION 1: resources are added to plugin configuration. Someone who wanted to filter their webapp resources would need to add a complete resources configuration to their POM, such as: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId version2.0-beta-3-SNAPSHOT/version configuration resources resource directorysrc/main/webapp/WEB-INF/directory filteringtrue/filtering /resource /resources filters filter filterproperties${basedir}/src/main/ webapp/WEB-INF/classes/build.properties/filterproperties /filter /filters /configuration /plugin In this configuration, we still have overlap with the warSourceDirectory parameter to the war plugin and extra code needs to be added to deal with the circumstance that either/both are specified. OPTION 2: Existing semantics for the resource plugin are preserved, but interpreted slightly differently based on the packaging. When packagingwar/packaging, we treat the resources as components of the webapp. I think this significantly simplifies the user experience. Opinions? Brian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Resource Filtering for War Plugin
Hmm, I see there's a longstanding issue with this... http:// jira.codehaus.org/browse/MWAR-12 I'd kind of like to solve this... -b On Feb 20, 2006, at 12:51 AM, Brian Topping wrote: Hi folks, I've been working on web resource filtering with the war plugin and came across a consideration I'd like to ask of the group. What do you think of the term resources in the context of a war? To me, resources in the POM should be considered anything including the webapp resources, not just classpath resources. I see this because classpath resources could easily be added to $ {warSourceDirectory}/WEB-INF/classes and used from there. In this manner, ${warSourceDirectory} could be filtered with the same constructions people are used to with the resources plugin. This is the way I initially expected things to work. Brett felt otherwise when I talked to him on IRC, but he also said he doesn't do filtering with webapp content and I ought to ask people who care a little bit more about this subject. OPTION 1: resources are added to plugin configuration. Someone who wanted to filter their webapp resources would need to add a complete resources configuration to their POM, such as: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId version2.0-beta-3-SNAPSHOT/version configuration resources resource directorysrc/main/webapp/WEB-INF/directory filteringtrue/filtering /resource /resources filters filter filterproperties${basedir}/src/main/ webapp/WEB-INF/classes/build.properties/filterproperties /filter /filters /configuration /plugin In this configuration, we still have overlap with the warSourceDirectory parameter to the war plugin and extra code needs to be added to deal with the circumstance that either/both are specified. OPTION 2: Existing semantics for the resource plugin are preserved, but interpreted slightly differently based on the packaging. When packagingwar/packaging, we treat the resources as components of the webapp. I think this significantly simplifies the user experience. Opinions? Brian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Resource Filtering for War Plugin
I'm like Brett, I haven't needed filtering in the webapp source yet. But I think we'd need more details on how the second option would work. My initial thought is that treating classpath resources and webapp sources as resources is going to be really confusing... -Stephen On 2/20/06, Brian Topping [EMAIL PROTECTED] wrote: Hi folks, I've been working on web resource filtering with the war plugin and came across a consideration I'd like to ask of the group. What do you think of the term resources in the context of a war? To me, resources in the POM should be considered anything including the webapp resources, not just classpath resources. I see this because classpath resources could easily be added to $ {warSourceDirectory}/WEB-INF/classes and used from there. In this manner, ${warSourceDirectory} could be filtered with the same constructions people are used to with the resources plugin. This is the way I initially expected things to work. Brett felt otherwise when I talked to him on IRC, but he also said he doesn't do filtering with webapp content and I ought to ask people who care a little bit more about this subject. OPTION 1: resources are added to plugin configuration. Someone who wanted to filter their webapp resources would need to add a complete resources configuration to their POM, such as: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId version2.0-beta-3-SNAPSHOT/version configuration resources resource directorysrc/main/webapp/WEB-INF/directory filteringtrue/filtering /resource /resources filters filter filterproperties${basedir}/src/main/ webapp/WEB-INF/classes/build.properties/filterproperties /filter /filters /configuration /plugin In this configuration, we still have overlap with the warSourceDirectory parameter to the war plugin and extra code needs to be added to deal with the circumstance that either/both are specified. OPTION 2: Existing semantics for the resource plugin are preserved, but interpreted slightly differently based on the packaging. When packagingwar/packaging, we treat the resources as components of the webapp. I think this significantly simplifies the user experience. Opinions? Brian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Stephen Duncan Jr www.stephenduncanjr.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (MWAR-12) Add resource filtering to war plugin
[ http://jira.codehaus.org/browse/MWAR-12?page=comments#action_59006 ] Brian Topping commented on MWAR-12: --- I started working on a solution to this, not realizing that it was already in JIRA. When I tried this a few weeks ago, my assumption was that I would add a resources block to the project POM. Since it already specified packagingwar/packaging, I just assumed that the same configuration would work here, but it doesn't. Having gone through quite a bit of the code for both plugins by now, I can attest to the complexity of the resource filtering and how it would be good to avoid duplicating that into the war plugin. So I'm +1 for linking having these work together. It seems like a lot of the code in AbstractWarMojo.java could be removed if that were the case, and it looks like the class has had a lot of authors, so it would be worth doing. Add resource filtering to war plugin Key: MWAR-12 URL: http://jira.codehaus.org/browse/MWAR-12 Project: Maven 2.x War Plugin Type: Improvement Reporter: Mark Hobson Assignee: Brett Porter Attachments: test.zip Original Estimate: 15 minutes Remaining: 15 minutes 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]
Re: Resource Filtering for War Plugin
That's probably all we need to close discussion on it then. Brett had the idea of doing otherResources as plugin configuration. I'd rather err on the side of too verbose than confuse people. -b On Feb 20, 2006, at 3:22 AM, Stephen Duncan wrote: I'm like Brett, I haven't needed filtering in the webapp source yet. But I think we'd need more details on how the second option would work. My initial thought is that treating classpath resources and webapp sources as resources is going to be really confusing... -Stephen On 2/20/06, Brian Topping [EMAIL PROTECTED] wrote: Hi folks, I've been working on web resource filtering with the war plugin and came across a consideration I'd like to ask of the group. What do you think of the term resources in the context of a war? To me, resources in the POM should be considered anything including the webapp resources, not just classpath resources. I see this because classpath resources could easily be added to $ {warSourceDirectory}/WEB-INF/classes and used from there. In this manner, ${warSourceDirectory} could be filtered with the same constructions people are used to with the resources plugin. This is the way I initially expected things to work. Brett felt otherwise when I talked to him on IRC, but he also said he doesn't do filtering with webapp content and I ought to ask people who care a little bit more about this subject. OPTION 1: resources are added to plugin configuration. Someone who wanted to filter their webapp resources would need to add a complete resources configuration to their POM, such as: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId version2.0-beta-3-SNAPSHOT/version configuration resources resource directorysrc/main/webapp/WEB-INF/directory filteringtrue/filtering /resource /resources filters filter filterproperties${basedir}/src/main/ webapp/WEB-INF/classes/build.properties/filterproperties /filter /filters /configuration /plugin In this configuration, we still have overlap with the warSourceDirectory parameter to the war plugin and extra code needs to be added to deal with the circumstance that either/both are specified. OPTION 2: Existing semantics for the resource plugin are preserved, but interpreted slightly differently based on the packaging. When packagingwar/packaging, we treat the resources as components of the webapp. I think this significantly simplifies the user experience. Opinions? Brian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Stephen Duncan Jr www.stephenduncanjr.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Updated: (MWAR-12) Add resource filtering to war plugin
[ http://jira.codehaus.org/browse/MWAR-12?page=all ] Brian Topping updated MWAR-12: -- Attachment: MWAR-12.patch Add resource filtering to war plugin Key: MWAR-12 URL: http://jira.codehaus.org/browse/MWAR-12 Project: Maven 2.x War Plugin Type: Improvement Reporter: Mark Hobson Assignee: Brett Porter Attachments: MWAR-12.patch, test.zip Original Estimate: 15 minutes Remaining: 15 minutes 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]
[jira] Commented: (MWAR-12) Add resource filtering to war plugin
[ http://jira.codehaus.org/browse/MWAR-12?page=comments#action_56803 ] Olivier Lamy commented on MWAR-12: -- Hi, An other simple is using xdoclet-maven-plugin. Actually I attached it tho the phase process-classes. But when I just want to try a simple the simple : mvn -Dtest=something clean test. All of my .java are parsed by the plugin whereas this should be done in a phase just before packaging. I really need a phase just before package to place all this jobs Olivier Add resource filtering to war plugin Key: MWAR-12 URL: http://jira.codehaus.org/browse/MWAR-12 Project: Maven 2.x War Plugin Type: Improvement Reporter: Mark Hobson Assignee: Brett Porter Attachments: test.zip Original Estimate: 15 minutes Remaining: 15 minutes 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]
[jira] Commented: (MWAR-12) Add resource filtering to war plugin
[ http://jira.codehaus.org/browse/MWAR-12?page=comments#action_55999 ] Cameron Braid commented on MWAR-12: --- related to http://jira.codehaus.org/browse/MWAR-22 I think that adding a prepare-package phase is the best way to go. This will allow 2 things : 1) maven to provide a default way of filtering or selecting resources for the war 2) provides a way for custom mojos to hook in Add resource filtering to war plugin Key: MWAR-12 URL: http://jira.codehaus.org/browse/MWAR-12 Project: Maven 2.x War Plugin Type: Improvement Reporter: Mark Hobson Assignee: Brett Porter Attachments: test.zip Original Estimate: 15 minutes Remaining: 15 minutes 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]
[jira] Commented: (MWAR-12) Add resource filtering to war plugin
[ http://jira.codehaus.org/browse/MWAR-12?page=comments#action_55481 ] Brett Porter commented on MWAR-12: -- I don't see that as being any different. Really, I don't know that this should be called resources. These are web resources that are different to normal classpath resources. It has been pointed out there are several cases of files being copied that should be filtered, utilising the resources plugin even if not the resources section of the POM. Add resource filtering to war plugin Key: MWAR-12 URL: http://jira.codehaus.org/browse/MWAR-12 Project: Maven 2.x War Plugin Type: Improvement Reporter: Mark Hobson Assignee: Brett Porter Attachments: test.zip Original Estimate: 15 minutes Remaining: 15 minutes 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]
[jira] Commented: (MWAR-12) Add resource filtering to war plugin
[ http://jira.codehaus.org/browse/MWAR-12?page=comments#action_55283 ] Olivier Lamy commented on MWAR-12: -- Hi, Is it possible to imagine adding a phase called package-resources. With this we could add some resources (same format as in the build section) in war configuration to include some stuffs which are not really mandatory for the compile : - struts config files - velocity templates - Note this phase could be used in others plugins which generates some files not really needed for compile (jar with manifest, ear with application.xml ..) WDYT ? - Olivier Add resource filtering to war plugin Key: MWAR-12 URL: http://jira.codehaus.org/browse/MWAR-12 Project: Maven 2.x War Plugin Type: Improvement Reporter: Mark Hobson Assignee: Brett Porter Attachments: test.zip Original Estimate: 15 minutes Remaining: 15 minutes 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]
[jira] Moved: (MWAR-12) Add resource filtering to war plugin
[ http://jira.codehaus.org/browse/MWAR-12?page=all ] Maria Odea Ching moved MNG-791 to MWAR-12: -- Version: (was: 2.0-beta-1) Fix Version: (was: 2.0.3) Component: (was: maven-war-plugin) Workflow: jira (was: Maven) Key: MWAR-12 (was: MNG-791) Project: Maven 2.x War Plugin (was: Maven 2) Add resource filtering to war plugin Key: MWAR-12 URL: http://jira.codehaus.org/browse/MWAR-12 Project: Maven 2.x War Plugin Type: Improvement Reporter: Mark Hobson Assignee: Brett Porter Attachments: test.zip Original Estimate: 15 minutes Remaining: 15 minutes 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]
[jira] Updated: (MNG-791) Add resource filtering to war plugin
[ http://jira.codehaus.org/browse/MNG-791?page=all ] John Casey updated MNG-791: --- Fix Version: (was: 2.0.1) 2.0.2 Add resource filtering to war plugin Key: MNG-791 URL: http://jira.codehaus.org/browse/MNG-791 Project: Maven 2 Type: Improvement Components: maven-war-plugin Versions: 2.0-beta-1 Reporter: Mark Hobson Assignee: Brett Porter Fix For: 2.0.2 Attachments: test.zip Original Estimate: 15 minutes Remaining: 15 minutes 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]
[jira] Commented: (MNG-791) Add resource filtering to war plugin
[ http://jira.codehaus.org/browse/MNG-791?page=comments#action_52500 ] Olivier Lamy commented on MNG-791: -- Hi all, Have a look to this http://jira.codehaus.org/browse/MNG-1683 (which a possible implementation of adding resources in the war 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-war-plugin Versions: 2.0-beta-1 Reporter: Mark Hobson Assignee: Brett Porter Fix For: 2.0.1 Attachments: test.zip Original Estimate: 15 minutes Remaining: 15 minutes 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]
[jira] Updated: (MNG-791) Add resource filtering to war plugin
[ http://jira.codehaus.org/browse/MNG-791?page=all ] Mark Hobson updated MNG-791: Attachment: test.zip As a workaround to this issue, you can use a project structure like the one attached. It basically splits webapp resources off into filtered and unfiltered ones - leaving the war plugin to copy the unfiltered resources, and using the resources plugin to copy the filtered resources with a cunning ../finalName path. This obviously relies on a standard maven project structure. It also works if you want to profile-off your filters for different target environments. Add resource filtering to war plugin Key: MNG-791 URL: http://jira.codehaus.org/browse/MNG-791 Project: Maven 2 Type: Improvement Components: maven-war-plugin Versions: 2.0-beta-1 Reporter: Mark Hobson Assignee: Brett Porter Fix For: 2.0.1 Attachments: test.zip Original Estimate: 15 minutes Remaining: 15 minutes 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]
[jira] Commented: (MNG-791) Add resource filtering to war plugin
[ http://jira.codehaus.org/browse/MNG-791?page=comments#action_47190 ] Mike Moulton commented on MNG-791: -- I noticed this isn't currently in the roadmap to be fixed. Is this a dead issue or something still to be pursued? I am very interested in the possibilities given the structure proposed by Kenney. Add resource filtering to war plugin Key: MNG-791 URL: http://jira.codehaus.org/browse/MNG-791 Project: Maven 2 Type: Improvement Components: maven-war-plugin Versions: 2.0-beta-1 Reporter: Mark Hobson Assignee: Brett Porter Original Estimate: 15 minutes Remaining: 15 minutes 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]
[jira] Updated: (MNG-791) Add resource filtering to war plugin
[ http://jira.codehaus.org/browse/MNG-791?page=all ] Brett Porter updated MNG-791: - Remaining Estimate: 15 minutes Original Estimate: 900 Add resource filtering to war plugin Key: MNG-791 URL: http://jira.codehaus.org/browse/MNG-791 Project: Maven 2 Type: Improvement Components: maven-war-plugin Versions: 2.0-beta-1 Reporter: Mark Hobson Assignee: Brett Porter Original Estimate: 15 minutes Remaining: 15 minutes 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]
[jira] Updated: (MNG-791) Add resource filtering to war plugin
[ http://jira.codehaus.org/browse/MNG-791?page=all ] Brett Porter updated MNG-791: - Component: (was: maven-plugins) maven-war-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-war-plugin 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]
[jira] Created: (MNG-791) Add resource filtering to war 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]
[jira] Commented: (MNG-791) Add resource filtering to war plugin
[ 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]
[jira] Commented: (MNG-791) Add resource filtering to war plugin
[ http://jira.codehaus.org/browse/MNG-791?page=comments#action_45322 ] Brett Porter commented on MNG-791: -- I agree that we don't want to duplicate the filtering configuration. I don't like making it a general resource section where the user must specify the targetPath. I think the best alternative might be to add some sort of type to the resource that the war plugin can use to select certain resource sets by. 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]