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...

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]

Reply via email to