jira-importer commented on issue #248:
URL: 
https://github.com/apache/maven-war-plugin/issues/248#issuecomment-2967855707

   **[Nicolas 
Marcotte](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=nicolasm)**
 commented
   
   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)
   
   ```xml
   <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.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to