[
https://issues.apache.org/jira/browse/MNG-7040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17239995#comment-17239995
]
Matt Pavlovich commented on MNG-7040:
-------------------------------------
[~pzygielo] xml fixed. Thanks!
Could you elaborate or provide an example of your idea on using XPath?
Off hand-- I'm not sure that XPath makes sense, and could lead to confusion.
The include/exclude queries do not equate to find matching nodes (or
attributes) in an XML document, but rather filter from a Collection of
dependencies that are in scope. Those dependencies have fields on them
(groupId, artifactId, version, classifier, type, etc) that *may* align to an
xml element, but there is no guarantee as to the location in relation the
current or effective pom xml.
> [RFC] Enhance include and exclude handling to use ldap-style filter syntax
> --------------------------------------------------------------------------
>
> Key: MNG-7040
> URL: https://issues.apache.org/jira/browse/MNG-7040
> Project: Maven
> Issue Type: Improvement
> Reporter: Matt Pavlovich
> Priority: Major
>
> Ldap-style filters provide a query syntax that would solve for supporting
> complex include and exclude scenarios in a concise way.
> ref: [RFC 2254|https://tools.ietf.org/html/rfc2254]
> Example - Include all matching a groupId=com.company
> {noformat}
> <includes>
> <include filter="(groupId=com.company)"/>
> </include>
> {noformat}
> Example -- Exclude all except one with artfactId=foo-bar
> {noformat}
> <excludes>
> <exclude filter="(&(groupId=com.company)(!(artifactId=foo-bar)))"/>
> </excludes>
> {noformat}
> Example -- Exclude all except a few with various matches
> {noformat}
> <excludes>
> <exclude
> filter="(&(groupId=com.company)(|(!(artifactId=foo-bar))(!(type=zip))(!(classifier=default))))"/>
> </excludes>
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)