apache / apache/maven-assembly-plugin
[MASSEMBLY-607] Wildcard in dependencySet/includes doesn't match artifact with empty classifier
- Dominant language
- Java
- Stars
- 110
- Forks
- 75
- Avg merge
- 12h 54m
- Merged PRs (30d)
- 10
Description
**[Alexander Kormushin](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=akormushin)** opened **[MASSEMBLY-607](https://issues.apache.org/jira/browse/MASSEMBLY-607?redirect=false)** and commented
Following dependency set will match only my jar artifacts with any non-empty classifier:
```
com.mycompany.*:*:jar:*:*
```
But it seems wildcard should include empty ones.
Here is the related code fragment:
```
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 );
```
I have following values achieving 182 line:
pattern=[com.mycompany.*, *, jar, *, *]
tokens=[com.mycompany, myproject, jar, 1.0.0-SNAPSHOT]
---
**Affects:** 2.3
**Issue Links:**
- [MSHARED-386](https://issues.apache.org/jira/browse/MSHARED-386) Wildcard does not work with null classifier
(_**"depends upon"**_)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the matchAgainst method around line 181, using the dependencySet include pattern and artifact tokens shown in the issue. Check how wildcard matching handles an omitted classifier and verify that the pattern also matches artifacts with an empty classifier; the related MSHARED-386 issue may define the dependency.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100