On 18 February 2011 09:27, Kristoffer Peterhaensel <
[email protected]> wrote:

> 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>
>
So always check for updates here

>        <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>
>
Always check for updates here

>        <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
> )
>
>
Ranges include -SNAPSHOTs within the range... at least they were originally
supposed to for crazy reasons... and then there is some strange strange
logic that effectively excludes them under certain circumstances.

I would try changing your update policy to daily and see how that affects
your build.

Benjamin might be able to shed some light for the 3.x behaviour with regards
to ranges and SNAPSHOTs but my hunch is that it's because you have repos
with update policy of always

-Stephen

>
>  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