jeudi 2 avril 2015

What is the maven way to work with local forks?

I have a java spring webapp, WebappA, that uses LibraryY. LibraryY uses another library, LibraryZ.


I want to change something in LibraryZ.


What is the happy path to doing this using maven and github? What is the maven way?


I git cloned Y and Z to my machine, and I ran mvn install in each. They each built, and jars were produced, and it was fine, but WebappA depends on RELEASE builds, so me making *-SNAPSHOT builds in ~/.m2/[...] did nothing. I think? Which is fine.


How am I supposed to alter the source code to LibraryZ so that WebappA uses it locally?


I tried changing the version number of LibraryZ to "*-mybuild", but then it itself didn't build, because its submodules, which have no dependencies, declare LibrayZ as its parent, and their "parent" is referenced by version number? I think?


A colleague suggested changing the groupId of LibraryZ, but I haven't tried that since that seems even crazier than changing all the version numbers in all these pom files.


It looks like the happy path is altering dozens of pom files with a change of the version number, but that seems crazy and wrong.


I feel like I am missing something, because that does not seem right.


What is the maven way of making changes to a local fork of a java library that is used by my app?


Thanks!


-neil


Aucun commentaire:

Enregistrer un commentaire