My team always favors defining repos in the top-level (parent) POM.  If we 
require special project-specific settings that must be in settings.xml, we put 
settings.xml in the top-level of the project source tree and check it in...

For publishing projects to our binary repo for consumption by other groups, we 
simply use the flatten-maven-plugin to strip out the repo (and other 
build-related stuff) from the published POM.


-----Original Message-----
From: KARR, DAVID [mailto:dk0...@att.com] 
Sent: Monday, October 17, 2016 3:03 PM
To: users@maven.apache.org
Subject: Comparing specifying repositories in pom vs. settings.xml?

One thing I run into when jumping between different projects is different 
expectations for what maven repos I need to be using.  In the past, I had to 
have multiple copies of "~/.m2/settings.xml" lying around, and I would hack the 
specified repos when I needed to.

Recently, I saw a situation where the required repositories were simply defined 
in the top-level pom for the project.  If this is done consistently, there's no 
longer any need to hack the settings.xml file.

I seem to remember seeing some advice that specifying repositories in the POM 
is a bad practice.  If I'm remembering this correctly, this seems odd.  Forcing 
the correct repos to be defined in the settings.xml works against "repeatable 
builds".

What is the recommended advice here?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to