Enhance relocation to work for all versions
- Dominant language
- Java
- Stars
- 5.3k
- Forks
- 3.1k
- Avg merge
- 20h 42m
- Merged PRs (30d)
- 297
Description
## New feature, improvement proposal
Currently, relocation feature is version specific.
Can this be enhanced to use a version range, or make it work for all versions?
### Use Case
MicroProfile is a POM-packaged artifact that points to other dependencies in `org.eclipse.microprofile` group.
```
[INFO] +- org.eclipse.microprofile:microprofile:pom:7.1:provided
[INFO] | +- org.eclipse.microprofile.config:microprofile-config-api:jar:3.1:provided
[INFO] | +- org.eclipse.microprofile.fault-tolerance:microprofile-fault-tolerance-api:jar:4.1:provided
[INFO] | +- org.eclipse.microprofile.health:microprofile-health-api:jar:4.0.1:provided
[INFO] | +- org.eclipse.microprofile.metrics:microprofile-metrics-api:jar:5.1.0:provided
[INFO] | +- org.eclipse.microprofile.jwt:microprofile-jwt-auth-api:jar:2.1:provided
[INFO] | +- org.eclipse.microprofile.openapi:microprofile-openapi-api:jar:4.1:provided
[INFO] | +- org.eclipse.microprofile.rest.client:microprofile-rest-client-api:jar:4.0:provided
[INFO] | \- org.eclipse.microprofile.telemetry:microprofile-telemetry-api:pom:2.1:provided
```
What needs to be accomplished (example) is to add a some kind of relocation so that:
- `org.eclipse.microprofile:microprofile:8.0` is the last `org.eclipse.microprofile:microprofile` artifact published
- `org.eclipse.microprofile:microprofile:8.1` (and later) is automatically redirected to `jakarta.microprofile:microprofile:8.1`
The end result of (for example) including of ` org.eclipse.microprofile:microprofile:pom:10.7:provided`
would result in a tree that looks something like this:
```
[INFO] +- jakarta:microprofile:pom:10.7:provided
[INFO] | +- jakarta.config:microprofile-config-api:jar:3.1:provided
[INFO] | +- jakarta.fault-tolerance:microprofile-fault-tolerance-api:jar:4.1:provided
[INFO] | +- jakarta.health:microprofile-health-api:jar:4.0.1:provided
[INFO] | +- jakarta.metrics:microprofile-metrics-api:jar:5.1.0:provided
[INFO] | +- jakarta.jwt:microprofile-jwt-auth-api:jar:2.1:provided
[INFO] | +- jakarta.openapi:microprofile-openapi-api:jar:4.1:provided
[INFO] | +- jakarta.rest.client:microprofile-rest-client-api:jar:4.0:provided
[INFO] | \- jakarta.telemetry:microprofile-telemetry-api:pom:2.1:provided
```
### Why do this?
MicroProfile wants to merge with Jakarta EE.
However, it wants to avoid the mistakes that happened with Java EE -> Jakarta EE transition.
MicroProfile wants to provide a smooth, non-breaking migration path from MicroProfile to Jakarta EE.
### What are the alternatives?
Just publish both artifacts - Unfortunately this will introduce duplication and confusion, in addition to dependency clashes from transitive dependencies including both / either variants of the artifact
Why don't everybody just change / update the GAV coordinates? - There are many dependncies to these coordinates,
and changes require "waiting" for many dependencies to upgrade, which breaks the smooth upgrade path the the new artifacts.
Contributor guide
Assessment
This issue has not been assessed yet.