Excellent. That fixed my problem. It would be nice if the documentation was 
updated to indicate what needs to be done to prevent this situation:
http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html

It would still be nice, however, to be able to specify the order in which 
various repositories are searched.

Thanks for the suggestion.

-----Original Message-----
From: Simon Kitching [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 19, 2006 3:47 AM
To: Maven Users List
Subject: RE: Dependency Management, Prioritize Repositories - Internal,Central, 
etc.

On Wed, 2006-04-19 at 12:27 +0200, Jörg Schaible wrote:
> Roye, Suhneel BGI SF wrote on Wednesday, April 19, 2006 12:06 PM:
> 
> > Problem:
> > I have a custom JAR (built by our team) installed in my local 
> > repository, and yet every time I do a build, Maven attempts to 
> > download it from Central (iBiblio) before realizing it's located in 
> > my local repository. I would like to prevent Maven from attempting 
> > to download this JAR from Central every time I do a build.
> > 
> > Existing Solution:
> > Has anyone successfully dealt with this problem? I've seen several 
> > threads on this topic without any resolution. I do not want to 
> > override Central or disable downloading of JAR's from Central.
> > 
> > Potential Solution:
> > I would like to be able to specify the order in which Maven looks up 
> > repositories. I would like for it to first look in my local 
> > repository, then at a shared (corporate) repository, and finally go 
> > out to the Central (iBiblio) repository.
> 
> This will not really help, for SNAPSHOTs Maven has to look in every 
> repository.

True, for SNAPSHOT files.

If you're getting this problem with something other than SNAPSHOT files, then 
did you use -DgeneratePom=true when installing the files? 

I've been working on doing exactly this kind of thing today, and it's working 
fine. However if there is no pom file next to the jarfile in the local 
repository, then maven tries to fetch the *pom* (and only the pom) from the 
central repository, then gets the jar from the local one.
Putting a pom in the local repository fixes that.

Regards,

Simon 
 
This message and any attachments are confidential, proprietary, and may be 
privileged.  If this message was misdirected, Barclays Global Investors (BGI) 
does not waive any confidentiality or privilege.  If you are not the intended 
recipient, please notify us immediately and destroy the message without 
disclosing its contents to anyone.  Any distribution, use or copying of this 
e-mail or the information it contains by other than an intended recipient is 
unauthorized.  The views and opinions expressed in this e-mail message are the 
author's own and may not reflect the views and opinions of BGI, unless the 
author is authorized by BGI to express such views or opinions on its behalf.  
All email sent to or from this address is subject to electronic storage and 
review by BGI.  Although BGI operates anti-virus programs, it does not accept 
responsibility for any damage whatsoever caused by viruses being passed.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to