0

I am pretty new to using Maven, coming from a heavy ant background. I have been trying to figure out the "correct" way to handle how my Companies projects and release process works in Maven, but haven't really been able to get a straight answer.

We have our projects as a couple of core shared libraries, with the applications they process. So let's say:

Library A -- produces library-a.jar
Library B -- produces library-b.jar
Project C -- produces project-c.war

We use a common gitflow feature branching methodology. To make my question make more sense I'm going to give an example workflow during a release. Let's say we are working on 2 tickets (at the same time).

Ticket A (feature/A-Some-New-Thing).
>> Requires changes to Library A and Project C
Ticket B (feature/B-Some-Other-New-Thing).
>> Only requires changes to Project C

where each of the projects look like:

- master
|- develop
 |- feature/A-Some-New-Thing
 |- feature/B-Some-Other-New-Thing

Where multiple features for the next release will be built on the branch. More often than not feature/A-Some-New-Thing will exist in both the Library A and Project C repositories. What is the best way to set up maven / external repository (we are looking at Archiva) to be able to have feature/A build using the Library A snapshot and the Project C snapshot, but having Project C use the latest from develop when building (last release, not the current snapshot).

The complete end goal is to have this working in a CI environment (bamboo) figuring out the proper dependency to build and test against

Ryan S
  • 370
  • 2
  • 12
  • In your example does `project-c.war` contain `library-a.jar` ? Or in other words is it packaged into the war file? – khmarbaise Mar 14 '16 at 13:59
  • No. Due to some system limitations library-a is a build dependency, but is not actually bundled into the WAR by the time it hits deployment – Ryan S Mar 14 '16 at 14:02
  • Which means you really use shared libs in a web application...which is not the idea behind WAR/EAR files...what kind of system limitations ? – khmarbaise Mar 14 '16 at 14:20

0 Answers0