Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Not A Problem
-
2.2, 2.3, 2.4, 2.5
-
None
-
None
-
None
-
EAR
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:
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)
Attachments
Issue Links
- relates to
-
MWAR-340 <packagingExcludes> is ignored by war:exploded
- Closed