Hi all -

I thought I had a good handle on this, but can someone help me fully
understand the <mirrors> and <repositories> settings in settings.xml?

When one has a repository server running, and there are several urls grouped
up, why isn't it enough to tell maven where to look via a single mirrors
stanza?

Why do I then also have to define an additional repository?

For example, if I have:

<mirrors>
    <mirror>
        <id>full</id>
        <name>Public repository</name>
        <url>http://nexus.is.awesome/nexus/content/groups/public</url>
        <mirrorOf>*</mirrorOf>
    </mirror>
</mirrors>

Why do I also need to do this:

    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
          <repositories>
            <repository>
              <id>snapshots</id>
              <name>Snapshots</name>
              <releases>
                <enabled>false</enabled>
                <updatePolicy>always</updatePolicy>
                <checksumPolicy>warn</checksumPolicy>
              </releases>
              <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
                <checksumPolicy>fail</checksumPolicy>
              </snapshots>
              <url>
http://nexus.is.awesome/nexus/content/repositories/snapshots/</url>
              <layout>default</layout>
            </repository>
          </repositories>
        </profile>
......

I'd have thought that the mirror stanza above would have pointed maven to
this grouped up url for ALL artifact resolution.

Reply via email to