You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Dennis Lundberg (JIRA)" <ji...@codehaus.org> on 2012/10/28 16:59:13 UTC
[jira] (MASSEMBLY-607) Wildcard in dependencySet/includes doesn't
match artifact with empty classifier
[ https://jira.codehaus.org/browse/MASSEMBLY-607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=312493#comment-312493 ]
Dennis Lundberg commented on MASSEMBLY-607:
-------------------------------------------
I can confirm this.
As a work-around you might be able to use this pattern, which seems to include artifacts with or without a classifier.
{code:xml}
<include>com.mycompany.*:*:jar:*</include>
{code}
> Wildcard in dependencySet/includes doesn't match artifact with empty classifier
> -------------------------------------------------------------------------------
>
> Key: MASSEMBLY-607
> URL: https://jira.codehaus.org/browse/MASSEMBLY-607
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.3
> Environment: Windows 7/Maven 3.0.03
> Reporter: Alexander Kormushin
>
> Following dependency set will match only my jar artifacts with any non-empty classifier:
> {code}
> <dependencySet>
> <includes>
> <include>com.mycompany.*:*:jar:*:*</include>
> </includes>
> </dependencySet>
> {code}
> But it seems wildcard should include empty ones.
> Here is the related code fragment:
> {code:title=.m2\repository\org\apache\maven\shared\maven-common-artifact-filters\1.4\maven-common-artifact-filters-1.4.jar!\org\apache\maven\shared\artifact\filter\PatternIncludesArtifactFilter.class}
> 172 private boolean matchAgainst( final String value, final List patterns, final boolean regionMatch )
> 181 // fail immediately if pattern tokens outnumber tokens to match
> 182 boolean matched = ( patternTokens.length <= tokens.length );
> {code}
> I have following values achieving 182 line:
> pattern=[com.mycompany.*, *, jar, *, *]
> tokens=[com.mycompany, myproject, jar, 1.0.0-SNAPSHOT]
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira