[
https://jira.codehaus.org/browse/MWAR-308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul Alesius updated MWAR-308:
------------------------------
Description:
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}
was:
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$"));
{quote}
> <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
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira