Because we are behind a firewall I need to do a couple of things to
get maven to work.
1) Modify ~/.m2/settings.xml to include a <mirror> entry for every
repository that gets named.
2) Ensure that maven-proxy has an entry for the URL that corresponds
to the mirrors name
3) Ensure that our firewall rules get updated to allow access to that URL.

I think I've posted before about repository naming and whether there
was a way to enforce standard naming.  As you can see from the mirror
section below there are many duplicates because people need access to
the snapshot repository and they assign an arbitrary name to that
repository definition in their poms.

You can also see from the mirror entries that there is no mapping of
mirror names to URLs. So it is very possible that someone creates a
name clash with two repository names resolving to different repository
locations (e.g. "snapshots" is a candidate for this).

For most people this isn't an issue and they never see the fact that
repositories are renamed so I expect not a lot of extra thought has
been given to repository names. Does anyone know why repository
definitions have names when the repository URL is a unique name for
the repository? So instead of using the repository name in the
<mirrorOf> entry if the URL was used instead this would a) remove
multiple repository naming and b) make the entry more readable as you
know what repository is being mirrored.

Thoughts?

My ~/.m2/settings.xml mirror section:
   <!--
     Snapshot Repositories
   -->
   <mirror>
     <id>maven-proxy</id>
     <name>Maven-Proxy Mirror</name>
     <url>http://mvn-proxy.our.company:9998/repository</url>
     <mirrorOf>apache.snapshots</mirrorOf>
   </mirror>
   <mirror>
     <id>maven-proxy</id>
     <name>Maven-Proxy Mirror</name>
     <url>http://mvn-proxy.our.company:9998/repository</url>
     <mirrorOf>apache-snapshots</mirrorOf>
   </mirror>
   <mirror>
     <id>maven-proxy</id>
     <name>Maven-Proxy Mirror</name>
     <url>http://mvn-proxy.our.company:9998/repository</url>
     <mirrorOf>people.apache.org</mirrorOf>
   </mirror>
   <mirror>
     <id>maven-proxy</id>
     <name>Maven-Proxy Mirror</name>
     <url>http://mvn-proxy.our.company:9998/repository</url>
     <mirrorOf>snapshots</mirrorOf>
   </mirror>
   <mirror>
     <id>maven-proxy</id>
     <name>Maven-Proxy Mirror</name>
     <url>http://mvn-proxy.our.company:9998/repository</url>
     <mirrorOf>codehaus.org</mirrorOf>
   </mirror>
   <mirror>
     <id>maven-proxy</id>
     <name>Maven-Proxy Mirror</name>
     <url>http://mvn-proxy.our.company:9998/repository</url>
     <mirrorOf>codehaus-snapshots</mirrorOf>
   </mirror>
   <mirror>
     <id>maven-proxy</id>
     <name>Maven-Proxy Mirror</name>
     <url>http://mvn-proxy.our.company:9998/repository</url>
     <mirrorOf>codehaus.snapshots</mirrorOf>
   </mirror>
 </mirrors>

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

Reply via email to