maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phillip Hellewell <ssh...@gmail.com>
Subject Dumb question about mirrors and repositories
Date Mon, 06 Dec 2010 19:38:00 GMT
For some reason I was under the impression that if I had a mirrorOf *
defined in my settings.xml, I didn't need to have any <repositories>
defined.

  <mirrors>
    <mirror>
      <id>all-mirror</id>
      <name>Mirror of Everything</name>
      <url>http://maven.example.com:8080/nexus/content/groups/public</url>
      <mirrorOf>*</mirrorOf>
    </mirror>
  </mirrors>

It's been working just great up until now when I tried to depend on a
snapshot that is only in the remote repo.  It wouldn't find it, but
after I added an appropriate <repositories> section, it does:

  <profiles>
    <profile>
      <id>default-repo</id>
      <repositories>
        <repository>
          <id>adrepo-public</id>
          <url>http://maven.example.com:8080/nexus/content/groups/public</url>
          <snapshots><enabled>true</enabled></snapshots>
          <releases><enabled>true</enabled></releases>
        </repository>
      </repositories>
    </profile>
  <profiles>
  <activeProfiles>
    <activeProfile>default-repo</activeProfile>
  </activeProfiles>

So now I'm really curious.  Should it actually be working with just
the mirror, and if not, why not exactly?  Why should releases work
with the mirror but not snapshots?  And if I need to use
<repositories> anyways, should I get rid of the mirror?  (I'm thinking
no, since I really want to ensure it is always used over just using
Maven central directly).

Thanks,
Phillip

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message