File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes maven settings.xml configuration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "maven settings.xml configuration" Watch "maven settings.xml configuration" New topic
Author

maven settings.xml configuration

John Gregory
Ranch Hand

Joined: Oct 05, 2006
Posts: 118
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

Joined: Nov 27, 2006
Posts: 423

http://maven.apache.org/settings.html#Repositories
John Gregory
Ranch Hand

Joined: Oct 05, 2006
Posts: 118
Joachim,

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

John
Joachim Rohde
Ranch Hand

Joined: Nov 27, 2006
Posts: 423

I will answer again with a link: http://maven.apache.org/guides/mini/guide-mirror-settings.html
(first paragraph)
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16305
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
 
subject: maven settings.xml configuration