You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Mark Hobson (JIRA)" <ji...@codehaus.org> on 2005/08/26 12:18:02 UTC

[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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-791) Add resource filtering to war plugin

Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-791?page=comments#action_46611 ] 

Stephane Nicoll commented on MNG-791:
-------------------------------------

Note also that kenney's idea is applicable to ear / rar plugins.



> 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MWAR-12) Add resource filtering to war plugin

Posted by "Brian Topping (JIRA)" <ji...@codehaus.org>.
     [ 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MNG-791) Add resource filtering to war plugin

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-791) Add resource filtering to war plugin

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MNG-791) Add resource filtering to war plugin

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MWAR-12) Add resource filtering to war plugin

Posted by "Kris Nuttycombe (JIRA)" <ji...@codehaus.org>.
    [ 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.old    2006-02-24 09:39:23.000000000 -0700
+++ AbstractWarMojo.java        2006-02-24 09:46:13.000000000 -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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MWAR-12) Add resource filtering to war plugin

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MNG-791) Add resource filtering to war plugin

Posted by "Mark Hobson (JIRA)" <ji...@codehaus.org>.
     [ 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MWAR-12) Add resource filtering to war plugin

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-791) Add resource filtering to war plugin

Posted by "Mike Moulton (JIRA)" <ji...@codehaus.org>.
    [ 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MWAR-12) Add resource filtering to war plugin

Posted by "Brian Topping (JIRA)" <ji...@codehaus.org>.
    [ 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 <packaging>war</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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MWAR-12) Add resource filtering to war plugin

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MNG-791) Add resource filtering to war plugin

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-791) Add resource filtering to war plugin

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MWAR-12) Add resource filtering to war plugin

Posted by "Cameron Braid (JIRA)" <ji...@codehaus.org>.
    [ 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MWAR-12) Add resource filtering to war plugin

Posted by "Scott Tavares (JIRA)" <ji...@codehaus.org>.
     [ 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MNG-791) Add resource filtering to war plugin

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-791?page=all ]

Brett Porter updated MNG-791:
-----------------------------

    Fix Version: 2.0-beta-4

> 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-beta-4

>
> 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-791) Add resource filtering to war plugin

Posted by "Kenney Westerhof (JIRA)" <ji...@codehaus.org>.
    [ 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MWAR-12) Add resource filtering to war plugin

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org