added a comment - - edited
I have attached a patch named maven-war-plugin-2.1.1-NM that adds the following feature to this plugin:
the mutually exclusive (only if set to true) tags:
<regexInPackagingSelectionAllowed>true</regexInPackagingSelectionAllowed>
<negationInPackgingAllowed>true</negationInPackgingAllowed>
that modify the way the values of packagingIncludes and packagingExcludes are handled.
The tag regexInPackagingSelectionAllowed can be viewed as replacing SelectorUtils.match(pattern,testedString) by Pattern.compile(pattern).matcher(testedString).matches() for the interpretation of packagingIncludes/Excludes
the tag <negationInPackgingAllowed> permit the usage of the ! operator in the packagingIncludes/Excludes. Let me give you an example to illustrate how it works;
The jar in WEB-INF/lib before filetering:
cumulostratus-1.1.jar (declared as optional pulled by stratus)
stratus-1.1.CITRUS.jar (pulled stratus as it is a dependancies)
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1-NM</version>
<configuration >
<negationInPackagingSelectionAllowed>true</negationInPackagingSelectionAllowed>
<packagingExcludes>**/*.jar,!**/*.CITRUS.jar</packagingExcludes>
</configuration>
The jar in WEB-INF/lib after filtering:
stratus-1.1.CITRUS.jar
this patched version is actually running my integration build code, I would like feedback upon it
the patch file name is maven-war-plugin-2.1.1-NM.patch
Please tell me how to proceed to have it reviewed and integrated into your trunk if it solved others people needs.
Ideally that patch would be somewhere in plexus but i only needed it in the war with taglibs that must be present in WEB-INF/lib and I am a partisan of the minimal impacted dependencies approach to patch outside of major version.
Since the warSourceIncludes/warSourceExcludes parameters no longer works on jars - only on source files, this issue is now about packagingIncludes/packagingExcludes.