• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

maven settings.xml configuration

 
John Gregory
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know that you can configure where goes to pull files for inclusion in an application,
repo1 being the main one. But when I look at the settings.xml file that comes with
maven, there's really not much to it.

Suppose I have a dependency declared in my pom that pulls a unique jar file not
on the repo1 site, but can easily be found @ the jboss url of:
jboss maven

How do I configure the settings.xml file so maven KNOWS to go here to pull the
file I declared as a dependency in my pom?

Thanks.

John

 
Joachim Rohde
Ranch Hand
Posts: 433
Netbeans IDE
 
John Gregory
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joachim,

Ok, seems straightforward... However, what's the difference between a repository and
a mirror?

John
 
Joachim Rohde
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will answer again with a link: http://maven.apache.org/guides/mini/guide-mirror-settings.html
(first paragraph)
 
Tim Holloway
Saloon Keeper
Posts: 18300
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John Gregory wrote:I know that you can configure where goes to pull files for inclusion in an application,
repo1 being the main one. But when I look at the settings.xml file that comes with
maven, there's really not much to it.


That's by design. Maven builds are supposed to be repeatable, and the more you customize your system and your environment, the more likely there will be non-repeatable aspects in it. For the open-source Maven projects, you should (usually) be able to build them without any settings.xml file at all, although for performance, proxying, and other reasons you might find it useful to tweak some things.

Although this seems - and is - restrictive, I'm very much in favor of it. I've been burned too many times by being handed projects that could only be built using a specfic version of a specific brand of IDE with specific desktop settings. Which is to say an exact clone of the PC that the original developer used. Aside from the sheer amount of work that this generally entails, not infrequently it ends up conflicting with my own or other author's build environments.

Which is why I have a rule that every project I do be buildable via command-line without recourse to an IDE. IDE's are a major help. but when the chips are down, I want something that won't let me down.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic