views:

30

answers:

1

I use Hudson as our build server. WE have a very large project that is devided into several maven based projects. There are several dependencies between the artifacts of these projects. Currently we don't version the code good enough so that we need two maven repositories to manage the dependencies correctly.

My question is how to setup the two local repositories? I came up with two options:

  1. I have two maven installation where each has it's own repository. In Hudson I can configure the two repositories and can choose whichever I want on the job.

  2. I have one maven installation but two different config files. In this case I need to provide which config file to use within every job. The disadvantage is, that this information is displayed only if I hid the advanced button for the maven configuration within the job.

Are there any more options that I missed? What would you choose and why. The criteria is, that it should be easy to configure and easy to verify, even for someone who has little to no experience in configuring Hudson.

+1  A: 

My suggestion would be to define the different repositories in different profiles either in settings.xml of the hudson server (if you dont want it in the development environment), or in a parent pom for your projects. And then activate the profile you want at build time on hudson. I am suggesting this one because it is independent of your maven installation, so you do not have to worry about your custom configs when upgrading maven...

shipmaster
I didn't think about the aspect of upgrading maven. I will give it a thought. Thank you.
Peter Schuetze