I’ve forked a 3rd party git repo that uses maven, and I’m also using maven in my project (that uses the 3rd party library).
Now I want to make some changes in my fork, but not replace the original 3rd party artifacts in my maven repo. That is, I want to have my fork’s artifacts and the original 3rd party artifacts co-exist in my maven repo, so that I can switch between my changes and the original artificts by changing the dependencies in my consuming project.
What’s a good way to handle this? Should I replace the 3rd party’s artifact groupId(s) in my forked copy (e.g. replace org.3rdparty with org.3rdparty-myfork)? It’s a big project with lots of modules — is there a way to do this with a maven plugin (i.e. run through the whole module hierarchy and replace all references to the current groupId with the new one), analogous to mvn version:set?
Or should I change the artifact versionIds in my forked copy (e.g. replace x.y-SNAPSHOT with x.y-myfork-SNAPSHOT)?
Or something else?
The simplest approach is to use what you suggested to change the version into something like x.y-YOURFORK-SNAPSHOT.