[ 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to