maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hilco Wijbenga <hilco.wijbe...@gmail.com>
Subject Re: Dumb question about mirrors and repositories
Date Mon, 06 Dec 2010 19:55:49 GMT
On 6 December 2010 11:38, Phillip Hellewell <sshock@gmail.com> wrote:
> 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.
:
<snip/>
:
> 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).

You need to add something like the following to your settings.xml to
"enable" snapshots.

<profile>
  <id>SnapshotsOkay</id>
  <activation>
    <activeByDefault>true</activeByDefault>
  </activation>
  <repositories>
    <repository>
      <id>central</id>
      <url>http://central</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>central</id>
      <url>http://central</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>
</profile>

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


Mime
View raw message