[ 
https://jira.codehaus.org/browse/MWAR-308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Karl-Heinz Marbaise closed MWAR-308.
------------------------------------

    Resolution: Not A Bug
      Assignee: Karl-Heinz Marbaise

>From the WAR only those jar's well be removed if they have been defined as 
>dependencies in your EAR project...To prevent a jar being removed from the WAR 
>you shouldn't define the dependency in the EAR project as described here: 
http://maven.apache.org/plugins/maven-ear-plugin/examples/skinny-wars.html
So i don't see a problem with packagingExcludes. 
Based on that i will close the issue. If you have any objection please reopen 
the issue and give more details which describe the problem you have.

> <packagingExcludes> does not work.
> ----------------------------------
>
>                 Key: MWAR-308
>                 URL: https://jira.codehaus.org/browse/MWAR-308
>             Project: Maven WAR Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2, 2.3, 2.4, 2.5
>         Environment: EAR
>            Reporter: Paul Alesius
>            Assignee: Karl-Heinz Marbaise
>            Priority: Blocker
>
> When creating skinnyWars with maven-ear-plugin, you will end up removing all 
> libraries from WAR archives. Sometimes I need to keep web-fragment jars in 
> WEB-INF/lib inside the war otherwise it won't be used as a web-fragment (It 
> [the web fragment] can't be in the EAR it must be in the WAR).
> To do this I use packagingExcludes as such:
> <packagingExcludes>%regex[.*WEB-INF/lib/(?!project-my-webfragment).*.jar$]</packagingExcludes>
> To exclude everything by the fragment from the WAR in the EAR build. %regex[] 
> does not work and doesn't seem to have in any version..
> The regex is correct:
> {quote}
> Assert.assertFalse("som/WEB-INF/lib/project-my-webfragment-0.0.1.jar".matches(".*
>  WEB-INF/lib/(?!project-my-webfragment). *.jar$"));
> Assert.assertTrue("som/WEB-INF/lib/project-my-library-0.0.1.jar".matches(".* 
> WEB-INF/lib/(?!project-my-webfragment). *.jar$"));
> (Had to insert spaces around * so it wouldn't be used for bold text 
> formatting)
> {quote}



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to