apache / apache/maven-resolver
[MRESOLVER-267] Align local repository implementation content types
- Dominant language
- Java
- Stars
- 152
- Forks
- 160
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 49
Description
**[Tamas Cservenak](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=cstamas)** opened **[MRESOLVER-267](https://issues.apache.org/jira/browse/MRESOLVER-267?redirect=false)** and commented
This is due legacy: resolver implements two LRMs: "simple" and "enhanced". The API exposes this method:
`org.eclipse.aether.repository.ArtifactRepository#getContentType`
That in case of those two are inconsistent:
* Simple LRM factory acts if passed in LocalRepository contentType is "" (empty string) or "simple".
* Enhanced LRM factory acts if passed in LocalRepository contentType is "" (empty string) or "default".
BUT, once created, the
* simple LRM.getRepository().getCotentType() reports "simple" -- OK
* enhanced LRM.getRepository().getContentType() reports "enhanced" -- NOT OK
As using contentType returned from enhanced LRM.getRepository().getContnetType() to create LRM will lead to error, as if you look at factories, no factory will respond to "enhanced" content type (hence, in this cases, hack is needed to override "enhanced" content type to "default").
This fix is possible only with major upgrade in resolver, as backward fix (to make this work with all supported Maven from 3.2.5 to 3.999) is not really possible now.
---
No further details from [MRESOLVER-267](https://issues.apache.org/jira/browse/MRESOLVER-267?redirect=false)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with org.eclipse.aether.repository.ArtifactRepository#getContentType and the simple and enhanced local repository manager factories described in the issue. Trace how each content type is accepted and reported, then verify that the value returned by each manager can be used to recreate the same manager without special handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100