Hey.

Thanks for the reply.

We have a couple of snapshot repositories in the settings.xml. But for some reason they do not show up in the output of mvn help:effective-settings. We also specify that our local Nexus installation is a mirror of central (and some other public repos).

Running a help:effective-pom on gives the following output. Our own releases should be on our mirror of central. So it should just fetch them there.

  <repositories>
    <repository>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
        <updatePolicy>always</updatePolicy>
        <checksumPolicy>fail</checksumPolicy>
      </snapshots>
      <id>snapshots</id>
      <name>SafeCom Snapshots</name>
      <url>http://webdev01:10080/nexus/content/repositories/snapshots</url>
    </repository>
    <repository>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
        <updatePolicy>always</updatePolicy>
        <checksumPolicy>fail</checksumPolicy>
      </snapshots>
      <id>public-snapshots</id>
      <name>Public Snapshots Proxies</name>
      <url>http://webdev01:10080/nexus/content/groups/public-snapshots</url>
    </repository>
    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>Maven Repository Switchboard</name>
      <url>http://repo1.maven.org/maven2</url>
    </repository>
  </repositories>


I don't really think it explains why it looks like maven tries to resolve a released version on a snapshot repository (as can be seen in this trace output: http://jira.codehaus.org/secure/attachment/53605/mvn-verify-range-version.log)

what is the updatePolicy in each of the repositories sections?

mvn help:effective-settings

will show the effective settings, then look for the

*updatePolicy*: This element specifies how often updates should attempt to
occur. Maven will compare the local POM's timestamp (stored in a
repository's maven-metadata file) to the remote. The choices are: always,
daily (default), interval:X (where X is an integer in minutes) or never.

as the updatePolicy should also apply to the maven-metadata.xml for each
repo you have defined.

The Hudson/Jenkins server will be building all the time and so only
occasionally check for the metadata.  Your builds will be less frequent, so
you might seem to "always" update even if it is set to "daily"

-Stephen

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to