On 15 Jun 07, at 4:38 AM 15 Jun 07, Kenney Westerhof wrote:
Mark Hobson wrote:
Hi,
I need an ArtifactFilter that supports wildcards and have patched
IncludesArtifactFilter accordingly, but then saw MNG-2621. I
implemented wildcards slightly stricter than allowing arbitrary
regular expressions - from the Javadoc:
The artifact pattern syntax is of the form:
[groupId]:[artifactId]:[type]:[version]
Where each pattern segment is optional and supports full and
partial * wildcards.
An empty pattern segment is treated as an implicit wildcard.
For example, org.apache.* would match all artifacts whose group
id started with
org.apache., and :::*-SNAPSHOT would match all snapshot artifacts.
Would this be acceptable? If not, we could either add a flag in the
constructor to signify whether wildcards are to be supported, or
subclass IncludesArtifactFilter to add wildcard support. Let me know
what's preferable and I'll submit a patch.
I think it's safest to assume no regexps at all, so your solution
looks fine.
Jason, you said in MNG-2621 it could wreak havoc - how so? I think
it's safer to not
allow * for partial matches too, but we have no choice in the version
tag, or we should write a more complex ArtifactMatcher system...
That one small typo will render a system useless. What's the usecase
for not having to select individual artifacts to filter?
The filters are looking like something that will be used to exclude
dependencies and things of that nature where you have the exact
artifact you want to filter.
The filters as we are using them to knock out core libraries will
probably be replaced with the import mechanism that we've started
using in the branch and the trunk and that master filter list for our
internals will go away. A filter that does not have specific intent
of eliminating a single artifact will cause more hassles then the
perceived benefit of not having to write them out individually.
Cheers,
Kenney
Cheers,
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Thanks,
Jason
----------------------------------------------------------
Jason van Zyl
Founder and PMC Chair, Apache Maven
jason at sonatype dot com
----------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]