mirror of
https://github.com/apache/maven.git
synced 2025-02-10 03:56:01 +00:00
With some improvements. It accepts user property with CSV entries for relocations. To toy with it, use `-Dmaven.relocations.entries` user property, for example create `.mvn/maven.config` file with contents: ``` -Dmaven.relocations.entries=entry1,entry2,... ``` It accepts CSV (comma delimited) of entries, while entry form is as: ``` GAV>GAV ``` Where left GAV can contain `*` for any elem (so `*:*:*` would mean ALL, something you don't want). Right GAV is either fully specified, or also can contain `*`, then it behaves as "ordinary relocation": the coordinate is preserved from relocated artifact. Finally, if right hand GAV is absent (line looks like "GAV>"). the left hand matching GAV is banned fully (from resolving). Note: the ">" means project level, while ">>" means global (whole session level, so even plugins will get relocated artifacts) relocation. Examples: ``` -Dmaven.relocations.entries=org.foo:*:*>,org.here:*:*>org.there:*:*,javax.inject:javax.inject:1>>jakarta.inject:jakarta.inject:1.0.5 ``` Meaning: 3 entries, ban `org.foo` group (exactly, so `org.foo.bar` is allowed), relocate `org.here` to `org.there` and finally **globally relocate** (see ">>") `javax.inject:javax.inject:1` to `jakarta.inject:jakarta.inject:1.0.5` --- https://issues.apache.org/jira/browse/MNG-7959