geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Woods <dwo...@apache.org>
Subject Re: building an internal Maven repo for archive purposes?
Date Tue, 29 Jan 2008 22:16:37 GMT
I'm using the following maven-proxy servlet on Tomcat as a way to 
control project builds -
	http://maven-proxy.codehaus.org/
You can create internal mirrors of select repos (like ibilio) and then 
configure external repos that you don't want to mirror (like snapshot 
repos.)  It also allows you to control the order that repos are 
searched, so you can setup your own internal build repo for your local 
Geornimo build artifacts to be searched before any of the external repos.

As far as Maven, you need to create/edit your $USER/.m2.settings.xml to 
contain the following -

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/POM/4.0.0"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                       http://maven.apache.org/xsd/settings-1.0.0.xsd">

   <mirrors>
     <!-- We are using Maven-Proxy to control the order our mirrored 
repos are searched.
     -->
     <mirror>
       <id>maven-proxy</id>
       <name>Mirror of all required maven repos</name>
       <url>http://<your_hostname>/maven-proxy/repository</url>
       <mirrorOf>*</mirrorOf>
     </mirror>
   </mirrors>
</settings>



-Donald


toby cabot wrote:
> Hi Folks,
> 
> I've been told that it's a "best practice" to build a Maven repo on
> the corporate intranet and use that for building copies of Geronimo
> that I might want to build months (or years) from now.  Seems
> reasonable, so I'm trying, but it's a challenge to get Maven to use my
> internal repo and not external ones.
> 
> I started by setting up a copy of my ~/.m2 tree (minus the jars that
> Geronimo builds locally) on an internal web server and modifying the
> top-level pom.xml to use only that repo.  That works most of the time,
> i.e. Maven makes ~599 attempts to download files from there.
> Unfortunately, it seems to be making 290 attempts to download files
> from repo1.maven.org, which I can't find in any of the pom.xml files
> in the source tree so I don't know how Maven learned about it (unless
> it's built into Maven).
> 
> Any help appreciated.
> 
> Thanks,
> Toby
> 

Mime
View raw message