You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Fabrice BELLINGARD (JIRA)" <ji...@codehaus.org> on 2005/09/28 14:22:10 UTC

[jira] Created: (MNG-1038) warSourceExcludes not working properly

warSourceExcludes not working properly
--------------------------------------

         Key: MNG-1038
         URL: http://jira.codehaus.org/browse/MNG-1038
     Project: Maven 2
        Type: Bug
  Components: maven-war-plugin  
    Versions: 2.0-beta-1    
 Environment: Win2k, Java 1.4.2_04, m2 beta1
 Reporter: Fabrice BELLINGARD


Note: I posted a message on Maven users list (http://www.mail-archive.com/users%40maven.apache.org/msg24088.html), but I got no answer so I post this issue, which in turn may or not be a bug... (sorry if it's not)

I experienced a strange behaviour with the 'warSourceExcludes' property. When I grab some Web projects from the CVS of my company, I usually get all the WEB-INF/lib Jars that the developers put in the CVS:
- With Maven 1, I use the 'maven.war.src.excludes' property to exclude those Jars ('maven.war.src.excludes=**/lib/*.*'), and it works well: the Jars packaged in the War are only the ones defined in the pom.
- With m2, I tried to use the 'warSourceExcludes' property, which seemed to me to be the equivalent property. However, when the War is generated, there is no jar in the WEB-INF/lib folder. This works as if the plugin is excluding files after having copied the needed dependencies in the WEB-INF/lib folder (whereas in the Maven 1 version, it was excluding them before).

Looking at the code of the m2 plugin, the value of 'warSourceExcludes' is used in method #getExcludes which is actually called in #performPackaging method. If this property is to work the same way as in m1, its value should be used in #copyResources method, before copying the Jar dependencies in WEB-INF/lib.

What do you guys think of that? Am I right or am I missing something?

-- 
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-1038) warSourceExcludes not working properly

Posted by "Fabrice BELLINGARD (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-1038?page=comments#action_50334 ] 

Fabrice BELLINGARD commented on MNG-1038:
-----------------------------------------

It seems that the patch hasn't been applied yet... When will the war plugin be released with these bug fixes? It is still in beta version while most other plugins have been finalised with Maven 2.0.

> warSourceExcludes not working properly
> --------------------------------------
>
>          Key: MNG-1038
>          URL: http://jira.codehaus.org/browse/MNG-1038
>      Project: Maven 2
>         Type: Bug
>   Components: maven-war-plugin
>     Versions: 2.0-beta-1
>  Environment: Win2k, Java 1.4.2_04, m2 beta1
>     Reporter: Fabrice BELLINGARD
>     Assignee: Edwin Punzalan
>      Fix For: 2.0.1
>  Attachments: MNG-1038-maven-war-plugin.patch, MNG-1038-maven-war-plugin.patch
>
>
> Note: I posted a message on Maven users list (http://www.mail-archive.com/users%40maven.apache.org/msg24088.html), but I got no answer so I post this issue, which in turn may or not be a bug... (sorry if it's not)
> I experienced a strange behaviour with the 'warSourceExcludes' property. When I grab some Web projects from the CVS of my company, I usually get all the WEB-INF/lib Jars that the developers put in the CVS:
> - With Maven 1, I use the 'maven.war.src.excludes' property to exclude those Jars ('maven.war.src.excludes=**/lib/*.*'), and it works well: the Jars packaged in the War are only the ones defined in the pom.
> - With m2, I tried to use the 'warSourceExcludes' property, which seemed to me to be the equivalent property. However, when the War is generated, there is no jar in the WEB-INF/lib folder. This works as if the plugin is excluding files after having copied the needed dependencies in the WEB-INF/lib folder (whereas in the Maven 1 version, it was excluding them before).
> Looking at the code of the m2 plugin, the value of 'warSourceExcludes' is used in method #getExcludes which is actually called in #performPackaging method. If this property is to work the same way as in m1, its value should be used in #copyResources method, before copying the Jar dependencies in WEB-INF/lib.
> What do you guys think of that? Am I right or am I missing something?

-- 
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] Closed: (MNG-1038) warSourceExcludes not working properly

Posted by "Edwin Punzalan (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-1038?page=all ]
     
Edwin Punzalan closed MNG-1038:
-------------------------------

    Resolution: Fixed

Patch applied.

Niklas Ekman: more info about the plugin can be found here: http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html

> warSourceExcludes not working properly
> --------------------------------------
>
>          Key: MNG-1038
>          URL: http://jira.codehaus.org/browse/MNG-1038
>      Project: Maven 2
>         Type: Bug
>   Components: maven-war-plugin
>     Versions: 2.0-beta-1
>  Environment: Win2k, Java 1.4.2_04, m2 beta1
>     Reporter: Fabrice BELLINGARD
>     Assignee: Edwin Punzalan
>      Fix For: 2.0.1
>  Attachments: MNG-1038-maven-war-plugin.patch, MNG-1038-maven-war-plugin.patch
>
>
> Note: I posted a message on Maven users list (http://www.mail-archive.com/users%40maven.apache.org/msg24088.html), but I got no answer so I post this issue, which in turn may or not be a bug... (sorry if it's not)
> I experienced a strange behaviour with the 'warSourceExcludes' property. When I grab some Web projects from the CVS of my company, I usually get all the WEB-INF/lib Jars that the developers put in the CVS:
> - With Maven 1, I use the 'maven.war.src.excludes' property to exclude those Jars ('maven.war.src.excludes=**/lib/*.*'), and it works well: the Jars packaged in the War are only the ones defined in the pom.
> - With m2, I tried to use the 'warSourceExcludes' property, which seemed to me to be the equivalent property. However, when the War is generated, there is no jar in the WEB-INF/lib folder. This works as if the plugin is excluding files after having copied the needed dependencies in the WEB-INF/lib folder (whereas in the Maven 1 version, it was excluding them before).
> Looking at the code of the m2 plugin, the value of 'warSourceExcludes' is used in method #getExcludes which is actually called in #performPackaging method. If this property is to work the same way as in m1, its value should be used in #copyResources method, before copying the Jar dependencies in WEB-INF/lib.
> What do you guys think of that? Am I right or am I missing something?

-- 
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-1038) warSourceExcludes not working properly

Posted by "Niklas Ekman (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-1038?page=comments#action_50686 ] 

Niklas Ekman commented on MNG-1038:
-----------------------------------

I read the documentation on the war plugin (http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html) and it should be possible to send in a comma separated list of excludes. I looked into the source but couldn't find anything that can make this work, so I think this is bug. The code below depends on the commons StringUtils helper class.

    protected String[] getExcludes()
    {
        List excludeList = new ArrayList( FileUtils.getDefaultExcludesAsList() );
        if ( warSourceExcludes != null && !"".equals( warSourceExcludes ) )
        {
            String[] excludes = StringUtils.split(warSourceExcludes, ",");
            for (int i = 0; i < excludes.length; i++) 
            {
              String exclude = excludes[i];
              excludeList.add( exclude );
            }
        }

        // if webXML is specified, omit the one in the source directory
        if ( getWebXml() != null && !"".equals( getWebXml() ) )
        {
            excludeList.add( "**/" + WEB_INF + "/web.xml" );
        }

        return (String[]) excludeList.toArray( EMPTY_STRING_ARRAY );
    }

I haven't written a testcase or even tested the code, but I want to verify if I've understood the function right.

> warSourceExcludes not working properly
> --------------------------------------
>
>          Key: MNG-1038
>          URL: http://jira.codehaus.org/browse/MNG-1038
>      Project: Maven 2
>         Type: Bug
>   Components: maven-war-plugin
>     Versions: 2.0-beta-1
>  Environment: Win2k, Java 1.4.2_04, m2 beta1
>     Reporter: Fabrice BELLINGARD
>     Assignee: Edwin Punzalan
>      Fix For: 2.0.1
>  Attachments: MNG-1038-maven-war-plugin.patch, MNG-1038-maven-war-plugin.patch
>
>
> Note: I posted a message on Maven users list (http://www.mail-archive.com/users%40maven.apache.org/msg24088.html), but I got no answer so I post this issue, which in turn may or not be a bug... (sorry if it's not)
> I experienced a strange behaviour with the 'warSourceExcludes' property. When I grab some Web projects from the CVS of my company, I usually get all the WEB-INF/lib Jars that the developers put in the CVS:
> - With Maven 1, I use the 'maven.war.src.excludes' property to exclude those Jars ('maven.war.src.excludes=**/lib/*.*'), and it works well: the Jars packaged in the War are only the ones defined in the pom.
> - With m2, I tried to use the 'warSourceExcludes' property, which seemed to me to be the equivalent property. However, when the War is generated, there is no jar in the WEB-INF/lib folder. This works as if the plugin is excluding files after having copied the needed dependencies in the WEB-INF/lib folder (whereas in the Maven 1 version, it was excluding them before).
> Looking at the code of the m2 plugin, the value of 'warSourceExcludes' is used in method #getExcludes which is actually called in #performPackaging method. If this property is to work the same way as in m1, its value should be used in #copyResources method, before copying the Jar dependencies in WEB-INF/lib.
> What do you guys think of that? Am I right or am I missing something?

-- 
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-1038) warSourceExcludes not working properly

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

Brett Porter updated MNG-1038:
------------------------------

    Fix Version: 2.0-beta-4

> warSourceExcludes not working properly
> --------------------------------------
>
>          Key: MNG-1038
>          URL: http://jira.codehaus.org/browse/MNG-1038
>      Project: Maven 2
>         Type: Bug
>   Components: maven-war-plugin
>     Versions: 2.0-beta-1
>  Environment: Win2k, Java 1.4.2_04, m2 beta1
>     Reporter: Fabrice BELLINGARD
>      Fix For: 2.0-beta-4

>
>
> Note: I posted a message on Maven users list (http://www.mail-archive.com/users%40maven.apache.org/msg24088.html), but I got no answer so I post this issue, which in turn may or not be a bug... (sorry if it's not)
> I experienced a strange behaviour with the 'warSourceExcludes' property. When I grab some Web projects from the CVS of my company, I usually get all the WEB-INF/lib Jars that the developers put in the CVS:
> - With Maven 1, I use the 'maven.war.src.excludes' property to exclude those Jars ('maven.war.src.excludes=**/lib/*.*'), and it works well: the Jars packaged in the War are only the ones defined in the pom.
> - With m2, I tried to use the 'warSourceExcludes' property, which seemed to me to be the equivalent property. However, when the War is generated, there is no jar in the WEB-INF/lib folder. This works as if the plugin is excluding files after having copied the needed dependencies in the WEB-INF/lib folder (whereas in the Maven 1 version, it was excluding them before).
> Looking at the code of the m2 plugin, the value of 'warSourceExcludes' is used in method #getExcludes which is actually called in #performPackaging method. If this property is to work the same way as in m1, its value should be used in #copyResources method, before copying the Jar dependencies in WEB-INF/lib.
> What do you guys think of that? Am I right or am I missing something?

-- 
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] Reopened: (MWAR-5) warSourceExcludes not working properly

Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MWAR-5?page=all ]
     
Stephane Nicoll reopened MWAR-5:
--------------------------------


> warSourceExcludes not working properly
> --------------------------------------
>
>          Key: MWAR-5
>          URL: http://jira.codehaus.org/browse/MWAR-5
>      Project: Maven 2.x War Plugin
>         Type: Bug

>  Environment: Win2k, Java 1.4.2_04, m2 beta1
>     Reporter: Fabrice BELLINGARD
>     Assignee: Edwin Punzalan
>      Fix For: 2.0
>  Attachments: MNG-1038-maven-war-plugin.patch, MNG-1038-maven-war-plugin.patch
>
>
> Note: I posted a message on Maven users list (http://www.mail-archive.com/users%40maven.apache.org/msg24088.html), but I got no answer so I post this issue, which in turn may or not be a bug... (sorry if it's not)
> I experienced a strange behaviour with the 'warSourceExcludes' property. When I grab some Web projects from the CVS of my company, I usually get all the WEB-INF/lib Jars that the developers put in the CVS:
> - With Maven 1, I use the 'maven.war.src.excludes' property to exclude those Jars ('maven.war.src.excludes=**/lib/*.*'), and it works well: the Jars packaged in the War are only the ones defined in the pom.
> - With m2, I tried to use the 'warSourceExcludes' property, which seemed to me to be the equivalent property. However, when the War is generated, there is no jar in the WEB-INF/lib folder. This works as if the plugin is excluding files after having copied the needed dependencies in the WEB-INF/lib folder (whereas in the Maven 1 version, it was excluding them before).
> Looking at the code of the m2 plugin, the value of 'warSourceExcludes' is used in method #getExcludes which is actually called in #performPackaging method. If this property is to work the same way as in m1, its value should be used in #copyResources method, before copying the Jar dependencies in WEB-INF/lib.
> What do you guys think of that? Am I right or am I missing something?

-- 
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-1038) warSourceExcludes not working properly

Posted by "Edwin Punzalan (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-1038?page=comments#action_48755 ] 

Edwin Punzalan commented on MNG-1038:
-------------------------------------

Fabrice,

I tested if the bug exists first before I go and look at the source.  And when I did test the bug (after the submitted fix), warSourceExcludes is working properly for the **/lib/*.* value.  That's when I said the bug seemed fixed already.

Anyway, looking at the source, i see that you are correct that #getExcludes is inside copyResources.  But please note that #copyResources is done only on the webapp directory... and lib is not in it.  This is the reason why during my tests does not fail.

Also, looking at the m1 source, m1 is also applying the war.src.excludes both to the war file and the resources.  So the port from m1 to m2 is still correct.

Btw, I tested again the configuration on 2.0-beta-2 and its working... the archive does not have anything inside lib but the WEB-INF/lib directory outside the archive has them all.

> warSourceExcludes not working properly
> --------------------------------------
>
>          Key: MNG-1038
>          URL: http://jira.codehaus.org/browse/MNG-1038
>      Project: Maven 2
>         Type: Bug
>   Components: maven-war-plugin
>     Versions: 2.0-beta-1
>  Environment: Win2k, Java 1.4.2_04, m2 beta1
>     Reporter: Fabrice BELLINGARD
>     Assignee: Edwin Punzalan
>      Fix For: 2.0
>  Attachments: MNG-1038-maven-war-plugin.patch
>
>
> Note: I posted a message on Maven users list (http://www.mail-archive.com/users%40maven.apache.org/msg24088.html), but I got no answer so I post this issue, which in turn may or not be a bug... (sorry if it's not)
> I experienced a strange behaviour with the 'warSourceExcludes' property. When I grab some Web projects from the CVS of my company, I usually get all the WEB-INF/lib Jars that the developers put in the CVS:
> - With Maven 1, I use the 'maven.war.src.excludes' property to exclude those Jars ('maven.war.src.excludes=**/lib/*.*'), and it works well: the Jars packaged in the War are only the ones defined in the pom.
> - With m2, I tried to use the 'warSourceExcludes' property, which seemed to me to be the equivalent property. However, when the War is generated, there is no jar in the WEB-INF/lib folder. This works as if the plugin is excluding files after having copied the needed dependencies in the WEB-INF/lib folder (whereas in the Maven 1 version, it was excluding them before).
> Looking at the code of the m2 plugin, the value of 'warSourceExcludes' is used in method #getExcludes which is actually called in #performPackaging method. If this property is to work the same way as in m1, its value should be used in #copyResources method, before copying the Jar dependencies in WEB-INF/lib.
> What do you guys think of that? Am I right or am I missing something?

-- 
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] Closed: (MWAR-5) warSourceExcludes not working properly

Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MWAR-5?page=all ]
     
Stephane Nicoll closed MWAR-5:
------------------------------

     Resolution: Fixed
    Fix Version: 2.0

> warSourceExcludes not working properly
> --------------------------------------
>
>          Key: MWAR-5
>          URL: http://jira.codehaus.org/browse/MWAR-5
>      Project: Maven 2.x War Plugin
>         Type: Bug

>  Environment: Win2k, Java 1.4.2_04, m2 beta1
>     Reporter: Fabrice BELLINGARD
>     Assignee: Edwin Punzalan
>      Fix For: 2.0
>  Attachments: MNG-1038-maven-war-plugin.patch, MNG-1038-maven-war-plugin.patch
>
>
> Note: I posted a message on Maven users list (http://www.mail-archive.com/users%40maven.apache.org/msg24088.html), but I got no answer so I post this issue, which in turn may or not be a bug... (sorry if it's not)
> I experienced a strange behaviour with the 'warSourceExcludes' property. When I grab some Web projects from the CVS of my company, I usually get all the WEB-INF/lib Jars that the developers put in the CVS:
> - With Maven 1, I use the 'maven.war.src.excludes' property to exclude those Jars ('maven.war.src.excludes=**/lib/*.*'), and it works well: the Jars packaged in the War are only the ones defined in the pom.
> - With m2, I tried to use the 'warSourceExcludes' property, which seemed to me to be the equivalent property. However, when the War is generated, there is no jar in the WEB-INF/lib folder. This works as if the plugin is excluding files after having copied the needed dependencies in the WEB-INF/lib folder (whereas in the Maven 1 version, it was excluding them before).
> Looking at the code of the m2 plugin, the value of 'warSourceExcludes' is used in method #getExcludes which is actually called in #performPackaging method. If this property is to work the same way as in m1, its value should be used in #copyResources method, before copying the Jar dependencies in WEB-INF/lib.
> What do you guys think of that? Am I right or am I missing something?

-- 
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-1038) warSourceExcludes not working properly

Posted by "Fabrice BELLINGARD (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-1038?page=comments#action_48768 ] 

Fabrice BELLINGARD commented on MNG-1038:
-----------------------------------------

Hi Edwin,

I'm getting confused for it seems that we don't understand each other: the actual problem is that the final War archive has *no* JARs in its WEB-INF/lib folder, which is definitely not correct because a WAR must contain the libs it depends on (if not, the web application can't be run, right?).

My use case is the following:
1- I check out a project from CVS: this project has JARs in its WEB-INF/lib folder because developers put them in the SCM. But some of those JARs may be unused (even if not removed from CVS). Only the POM can tell which JARs the project really depends on.
2- I want to build the WAR with "m2 package". In the final WAR archive, I don't want to have the unused JARs, but only the ones referenced in the POM.
   - With m1, when I build my project, the "war.src.excludes" property excludes the JARs that where checked out from CVS, and does not exclude the JARs that are copied from the local repo to be included in the War. And that's exactly what I expect this property to do!
   - But in m2, because #getExcludes is used in #performPackaging, the JARs previously copied from the local repo to be put in the WAR are also excluded from the War! Which I don't want, of course (a WAR archive needs its libs to be able to work properly!). So 'warSourceExcludes' should normally be used only in #copyResources (because it is meant to exclude files from the WAR *source*), but not in #performPackaging (because at that stage, the MOJO has copied from local repo the JARs corresponding to the dependencies defined in the POM, and I don't want the MOJO to exclude such files which are not *sources*).


> warSourceExcludes not working properly
> --------------------------------------
>
>          Key: MNG-1038
>          URL: http://jira.codehaus.org/browse/MNG-1038
>      Project: Maven 2
>         Type: Bug
>   Components: maven-war-plugin
>     Versions: 2.0-beta-1
>  Environment: Win2k, Java 1.4.2_04, m2 beta1
>     Reporter: Fabrice BELLINGARD
>     Assignee: Edwin Punzalan
>      Fix For: 2.0
>  Attachments: MNG-1038-maven-war-plugin.patch
>
>
> Note: I posted a message on Maven users list (http://www.mail-archive.com/users%40maven.apache.org/msg24088.html), but I got no answer so I post this issue, which in turn may or not be a bug... (sorry if it's not)
> I experienced a strange behaviour with the 'warSourceExcludes' property. When I grab some Web projects from the CVS of my company, I usually get all the WEB-INF/lib Jars that the developers put in the CVS:
> - With Maven 1, I use the 'maven.war.src.excludes' property to exclude those Jars ('maven.war.src.excludes=**/lib/*.*'), and it works well: the Jars packaged in the War are only the ones defined in the pom.
> - With m2, I tried to use the 'warSourceExcludes' property, which seemed to me to be the equivalent property. However, when the War is generated, there is no jar in the WEB-INF/lib folder. This works as if the plugin is excluding files after having copied the needed dependencies in the WEB-INF/lib folder (whereas in the Maven 1 version, it was excluding them before).
> Looking at the code of the m2 plugin, the value of 'warSourceExcludes' is used in method #getExcludes which is actually called in #performPackaging method. If this property is to work the same way as in m1, its value should be used in #copyResources method, before copying the Jar dependencies in WEB-INF/lib.
> What do you guys think of that? Am I right or am I missing something?

-- 
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-1038) warSourceExcludes not working properly

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

Edwin Punzalan updated MNG-1038:
--------------------------------

    Attachment: MNG-1038-maven-war-plugin.patch

Ok. I get your point and I totally misunderstood you there.

The attached patch will remove the includes/excludes in #performPackaging.

> warSourceExcludes not working properly
> --------------------------------------
>
>          Key: MNG-1038
>          URL: http://jira.codehaus.org/browse/MNG-1038
>      Project: Maven 2
>         Type: Bug
>   Components: maven-war-plugin
>     Versions: 2.0-beta-1
>  Environment: Win2k, Java 1.4.2_04, m2 beta1
>     Reporter: Fabrice BELLINGARD
>     Assignee: Edwin Punzalan
>      Fix For: 2.0
>  Attachments: MNG-1038-maven-war-plugin.patch, MNG-1038-maven-war-plugin.patch
>
>
> Note: I posted a message on Maven users list (http://www.mail-archive.com/users%40maven.apache.org/msg24088.html), but I got no answer so I post this issue, which in turn may or not be a bug... (sorry if it's not)
> I experienced a strange behaviour with the 'warSourceExcludes' property. When I grab some Web projects from the CVS of my company, I usually get all the WEB-INF/lib Jars that the developers put in the CVS:
> - With Maven 1, I use the 'maven.war.src.excludes' property to exclude those Jars ('maven.war.src.excludes=**/lib/*.*'), and it works well: the Jars packaged in the War are only the ones defined in the pom.
> - With m2, I tried to use the 'warSourceExcludes' property, which seemed to me to be the equivalent property. However, when the War is generated, there is no jar in the WEB-INF/lib folder. This works as if the plugin is excluding files after having copied the needed dependencies in the WEB-INF/lib folder (whereas in the Maven 1 version, it was excluding them before).
> Looking at the code of the m2 plugin, the value of 'warSourceExcludes' is used in method #getExcludes which is actually called in #performPackaging method. If this property is to work the same way as in m1, its value should be used in #copyResources method, before copying the Jar dependencies in WEB-INF/lib.
> What do you guys think of that? Am I right or am I missing something?

-- 
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] Reopened: (MNG-1038) warSourceExcludes not working properly

Posted by "Fabrice BELLINGARD (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-1038?page=all ]
     
Fabrice BELLINGARD reopened MNG-1038:
-------------------------------------


See my last comment - #getExcludes is used both in #copyResources and #performPackaging.

> warSourceExcludes not working properly
> --------------------------------------
>
>          Key: MNG-1038
>          URL: http://jira.codehaus.org/browse/MNG-1038
>      Project: Maven 2
>         Type: Bug
>   Components: maven-war-plugin
>     Versions: 2.0-beta-1
>  Environment: Win2k, Java 1.4.2_04, m2 beta1
>     Reporter: Fabrice BELLINGARD
>     Assignee: Edwin Punzalan
>      Fix For: 2.0
>  Attachments: MNG-1038-maven-war-plugin.patch
>
>
> Note: I posted a message on Maven users list (http://www.mail-archive.com/users%40maven.apache.org/msg24088.html), but I got no answer so I post this issue, which in turn may or not be a bug... (sorry if it's not)
> I experienced a strange behaviour with the 'warSourceExcludes' property. When I grab some Web projects from the CVS of my company, I usually get all the WEB-INF/lib Jars that the developers put in the CVS:
> - With Maven 1, I use the 'maven.war.src.excludes' property to exclude those Jars ('maven.war.src.excludes=**/lib/*.*'), and it works well: the Jars packaged in the War are only the ones defined in the pom.
> - With m2, I tried to use the 'warSourceExcludes' property, which seemed to me to be the equivalent property. However, when the War is generated, there is no jar in the WEB-INF/lib folder. This works as if the plugin is excluding files after having copied the needed dependencies in the WEB-INF/lib folder (whereas in the Maven 1 version, it was excluding them before).
> Looking at the code of the m2 plugin, the value of 'warSourceExcludes' is used in method #getExcludes which is actually called in #performPackaging method. If this property is to work the same way as in m1, its value should be used in #copyResources method, before copying the Jar dependencies in WEB-INF/lib.
> What do you guys think of that? Am I right or am I missing something?

-- 
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] Closed: (MNG-1038) warSourceExcludes not working properly

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

    Resolution: Fixed

> warSourceExcludes not working properly
> --------------------------------------
>
>          Key: MNG-1038
>          URL: http://jira.codehaus.org/browse/MNG-1038
>      Project: Maven 2
>         Type: Bug
>   Components: maven-war-plugin
>     Versions: 2.0-beta-1
>  Environment: Win2k, Java 1.4.2_04, m2 beta1
>     Reporter: Fabrice BELLINGARD
>     Assignee: Edwin Punzalan
>      Fix For: 2.0
>  Attachments: MNG-1038-maven-war-plugin.patch
>
>
> Note: I posted a message on Maven users list (http://www.mail-archive.com/users%40maven.apache.org/msg24088.html), but I got no answer so I post this issue, which in turn may or not be a bug... (sorry if it's not)
> I experienced a strange behaviour with the 'warSourceExcludes' property. When I grab some Web projects from the CVS of my company, I usually get all the WEB-INF/lib Jars that the developers put in the CVS:
> - With Maven 1, I use the 'maven.war.src.excludes' property to exclude those Jars ('maven.war.src.excludes=**/lib/*.*'), and it works well: the Jars packaged in the War are only the ones defined in the pom.
> - With m2, I tried to use the 'warSourceExcludes' property, which seemed to me to be the equivalent property. However, when the War is generated, there is no jar in the WEB-INF/lib folder. This works as if the plugin is excluding files after having copied the needed dependencies in the WEB-INF/lib folder (whereas in the Maven 1 version, it was excluding them before).
> Looking at the code of the m2 plugin, the value of 'warSourceExcludes' is used in method #getExcludes which is actually called in #performPackaging method. If this property is to work the same way as in m1, its value should be used in #copyResources method, before copying the Jar dependencies in WEB-INF/lib.
> What do you guys think of that? Am I right or am I missing something?

-- 
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-1038) warSourceExcludes not working properly

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

Edwin Punzalan updated MNG-1038:
--------------------------------

    Attachment: MNG-1038-maven-war-plugin.patch
                MNG-1038-plexus-utils.patch

I checked the code for the WAR plugin and found that this is already fixed.

However, when I tested it, I found a bug in plexus.getDefaultExcludes bec it was returning a fixed-sized List so adding objects into it is causing an exception.

The plexus patch would fix the plexus bug.
The war-plugin patch is a work-around for the plexus bug.

If the plexus patch is applied, the second patch is not needed anymore.

> warSourceExcludes not working properly
> --------------------------------------
>
>          Key: MNG-1038
>          URL: http://jira.codehaus.org/browse/MNG-1038
>      Project: Maven 2
>         Type: Bug
>   Components: maven-war-plugin
>     Versions: 2.0-beta-1
>  Environment: Win2k, Java 1.4.2_04, m2 beta1
>     Reporter: Fabrice BELLINGARD
>     Assignee: Edwin Punzalan
>      Fix For: 2.0-beta-4
>  Attachments: MNG-1038-maven-war-plugin.patch, MNG-1038-plexus-utils.patch
>
>
> Note: I posted a message on Maven users list (http://www.mail-archive.com/users%40maven.apache.org/msg24088.html), but I got no answer so I post this issue, which in turn may or not be a bug... (sorry if it's not)
> I experienced a strange behaviour with the 'warSourceExcludes' property. When I grab some Web projects from the CVS of my company, I usually get all the WEB-INF/lib Jars that the developers put in the CVS:
> - With Maven 1, I use the 'maven.war.src.excludes' property to exclude those Jars ('maven.war.src.excludes=**/lib/*.*'), and it works well: the Jars packaged in the War are only the ones defined in the pom.
> - With m2, I tried to use the 'warSourceExcludes' property, which seemed to me to be the equivalent property. However, when the War is generated, there is no jar in the WEB-INF/lib folder. This works as if the plugin is excluding files after having copied the needed dependencies in the WEB-INF/lib folder (whereas in the Maven 1 version, it was excluding them before).
> Looking at the code of the m2 plugin, the value of 'warSourceExcludes' is used in method #getExcludes which is actually called in #performPackaging method. If this property is to work the same way as in m1, its value should be used in #copyResources method, before copying the Jar dependencies in WEB-INF/lib.
> What do you guys think of that? Am I right or am I missing something?

-- 
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-1038) warSourceExcludes not working properly

Posted by "Fabrice BELLINGARD (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-1038?page=comments#action_48734 ] 

Fabrice BELLINGARD commented on MNG-1038:
-----------------------------------------

Well, I'm not sure this bug is fixed... I've just tested the following configuration (2.0-beta-2 has just been released, and which seems to have your patch):

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-war-plugin</artifactId>
					<version>2.0-beta-2</version>
					<configuration>
						<warSourceExcludes>**/lib/*.jar</warSourceExcludes>
					</configuration>
				</plugin>

and all the JARs are still excluded from the packaging.

Looking at the code, #getExcludes (which uses the 'warSourceExcludes' property) is indeed called in AbstractWarMojo#copyResources, but it is also called in WarMojo#performPackaging, which results in excluding all the JARs from the WAR - even the JARs that come from the pom dependencies.


> warSourceExcludes not working properly
> --------------------------------------
>
>          Key: MNG-1038
>          URL: http://jira.codehaus.org/browse/MNG-1038
>      Project: Maven 2
>         Type: Bug
>   Components: maven-war-plugin
>     Versions: 2.0-beta-1
>  Environment: Win2k, Java 1.4.2_04, m2 beta1
>     Reporter: Fabrice BELLINGARD
>     Assignee: Edwin Punzalan
>      Fix For: 2.0
>  Attachments: MNG-1038-maven-war-plugin.patch
>
>
> Note: I posted a message on Maven users list (http://www.mail-archive.com/users%40maven.apache.org/msg24088.html), but I got no answer so I post this issue, which in turn may or not be a bug... (sorry if it's not)
> I experienced a strange behaviour with the 'warSourceExcludes' property. When I grab some Web projects from the CVS of my company, I usually get all the WEB-INF/lib Jars that the developers put in the CVS:
> - With Maven 1, I use the 'maven.war.src.excludes' property to exclude those Jars ('maven.war.src.excludes=**/lib/*.*'), and it works well: the Jars packaged in the War are only the ones defined in the pom.
> - With m2, I tried to use the 'warSourceExcludes' property, which seemed to me to be the equivalent property. However, when the War is generated, there is no jar in the WEB-INF/lib folder. This works as if the plugin is excluding files after having copied the needed dependencies in the WEB-INF/lib folder (whereas in the Maven 1 version, it was excluding them before).
> Looking at the code of the m2 plugin, the value of 'warSourceExcludes' is used in method #getExcludes which is actually called in #performPackaging method. If this property is to work the same way as in m1, its value should be used in #copyResources method, before copying the Jar dependencies in WEB-INF/lib.
> What do you guys think of that? Am I right or am I missing something?

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