Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to properly fork a maven project?

Tags:

maven

I'm trying to fork a discontinued maven library that is already in the main repository.

What are good guidelines to follow when doing so?

Should the groupId/artifactId be changed so that it doesn't clash with the library that's already in the maven repository?

This library will be a dependency to a project that will also be available publicly(in the maven repo) so this library should also be there.

The modifications add improvements and some changes on how the library works, so I would like it to be separate from the old versions.

like image 809
George Jiglau Avatar asked Aug 22 '12 08:08

George Jiglau


2 Answers

Sonatype recommends you change the groupId when you fork a project.

B2) upload them under your the forked project groupId (presumably one you own and appropriate for the fork)

like image 166
Leif Gruenwoldt Avatar answered Oct 14 '22 15:10

Leif Gruenwoldt


I assume you are forking the other project for internal use? Then I would keep the original groupId/artifactId but add a postfix to the version. If the upstream version is 1.0.0 your custom version would be 1.0.0-custom.

If you create a public fork then you basically have to use a new project name and so a new groupId/artifactId.

like image 23
Christoph Leiter Avatar answered Oct 14 '22 15:10

Christoph Leiter