• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

maven settings.xml configuration

 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://maven.apache.org/settings.html#Repositories
 
John Gregory
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I will answer again with a link: http://maven.apache.org/guides/mini/guide-mirror-settings.html
(first paragraph)
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
That's a very big dog. I think I want to go home now and hug this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic