[MNG-7072] Ambiguity in handling of primary build artifact with classifier
- Dominant language
- Java
- Stars
- 5.3k
- Forks
- 3.1k
- Avg merge
- 20h 42m
- Merged PRs (30d)
- 297
Description
**[Łukasz Dywicki](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=splatch)** opened **[MNG-7072](https://issues.apache.org/jira/browse/MNG-7072?redirect=false)** and commented
A request for clarification and definitive resolution for edge case found in MGPG-75.
Currently `MavenProject.setArtifact` accepts an artifact with classifier. It works in most of the cases and most of plugins I saw so far, but it does not work with GPG plugin which loses primary artifact classifier and attaches signature **without** classifier.
Most of the time this goes under radar since install plugin report no issues and handles that properly. For release I was confirming we ended up with missing gpg signatures.
End result of build is following:
* opensmarthouse-core-0.9.0-connectorio-1-**features.xml**
* opensmarthouse-core-0.9.0-connectorio-1.**xml.asc**
* opensmarthouse-core-0.9.0-connectorio-1-features.xml.md5
* opensmarthouse-core-0.9.0-connectorio-1-features.xml.sha1
First file is primary build artifact (using Karaf features packaging).
Reason for creating this issue is simple - either behavior outlined by [Robert Scholte](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=rfscholte) should be enforced (refuse of classifiers for primary artifact) or GPG plugin and should be fixed. Given that Robert mentioned that it is something related to core please treat this as an input for starting discussion on how to handle this particular case.
---
**Affects:** 3.6.3
**Issue Links:**
- [MGPG-75](https://issues.apache.org/jira/browse/MGPG-75) Creates a signature with the wrong name if a classifier is defined
(_**"causes"**_)
- [KARAF-6997](https://issues.apache.org/jira/browse/KARAF-6997) Regression in GenerateFeaturesMojo - primary artifact with classifier
Contributor guide
Research direction
Start by reading MavenProject.setArtifact and the linked MGPG-75 and KARAF-6997 issues to understand how a primary artifact classifier is handled across Maven core and plugins. Done requires a documented, definitive resolution for the ambiguity and aligned behavior, but the issue does not identify specific files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100