0

I'm confused about how Archiva fully works. I understand that if we had a core set of dependencies, we could use Archiva as our local maven repo.

The thing I don't understand, is how Archiva manages build artifacts from your own projects.

Say I have a multi-module maven project - we can even use the one from the Sonaytpe for example. http://www.sonatype.com/books/mvnex-book/reference/multimodule-sect-building-multimodule.html

What if I wanted to have one team working on the Simple Model app, while I wanted another to work on the Simple webapp. But I didn't want either to have the projects they AREN'T assigned to, in their local workspace. Webapp needs Model to build, but I don't want the Wepapp team having direct access to Model.

Is there any way Maven can detect that the build artifact for Model wasn't in a Webapp dev's workspace, and pull it from our local Archiva repo, so they can still build the Webapp despite not having the model (maven module project) code in their workspace?

Sam Levin
  • 3,326
  • 7
  • 30
  • 44

1 Answers1

1

The Model project will be like any other third-party dependency and be downloaded by Archiva automatically, provided

  • the Webapp project specifies Model project as a dependency
  • the Model project is deployed to Archiva periodically (by a Continuous Integration system or other means).
Raghuram
  • 51,854
  • 11
  • 110
  • 122
  • So as long as I have the project listed as such: ---http://pastebin.com/LcHy61Hz---- inside the project's parent pom, that maven will automatically get the remaining build artifacts from archiva (if properly configured)? And whole program will be executable even though you may only have 1/5 piece of source code checked out? (as in one module of the project) – Sam Levin Jul 19 '11 at 05:15
  • @Sam Levin. No, this is not sufficient. Each module needs to specify its dependant module(s) in its respective pom. Parent pom is relevant if it defines shared dependencies and plugin configurations. Otherwise, it is just used to build all modules together. – Raghuram Jul 19 '11 at 15:07