You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Tom <tb...@tbee.org> on 2010/10/27 14:31:54 UTC

maven 3 snapshot resolving

  We use Nexus as our repository manager and publish all artifacts (snapshot and release) through one url. This was a suggested setup to solve a Maven 2.2.1 resolve behavior (I can't remember what exactly, so off the top of my head).

We have switched to Maven 3 and the following behavior occurs: a new snapshot of an entity is uploaded to Maven, but the using project keeps downloading the old version.

It turned out that in Nexus there were two snapshots:
- one with a date-time in the name (put there by Maven 3)
- one without a date-time in the name (put there previously by Maven 2)

Maven 3 seems to keep resolving to the old version. So I deleted the whole folder and rebuild it, now there only is a snapshot with date-time in the name:

/[ERROR] Failed to execute goal on project CheyenneWebProject: Could not resolve dependencies for project nl.innovationinvestments:CheyenneWebProject:pom:1.0-SNAPSHOT: Could not find artifact nl.innovationinvestments:CheyenneServlet:jar:1.11-SNAPSHOT in kp (http://alaya.applicationplaza.com:8081/nexus/content/groups/pub
lic) -> [Help 1]
/
The artifact
     nl.innovationinvestments:CheyenneServlet:jar:1.11-SNAPSHOT

indeed is not in the repository, it's called
     nl.innovationinvestments:CheyenneServlet:jar:1.11-20101027.120857.4

and Maven 3 does not find it?

Switching back to Maven 2.2.1 for now.

Tom


Re: maven 3 snapshot resolving

Posted by Tom <tb...@tbee.org>.
  Upgrading to Nexus 1.8 did solve it, it seems. Thanks!


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


Re: maven 3 snapshot resolving

Posted by Tom <tb...@tbee.org>.
  On 27-10-2010 15:04, Tom wrote:
>  My snapshot repositories were configured using <uniqueVersion>false</uniqueVersion>. Maven 3 does not seem to respect that when releasing and releases with a date-time anyhow, but does respect it when resolving and does not find the date-time files. By modifying uniqueVersion to true, it seems to work.
>
> Further testing is required, but this matches the behavior.

This seems to work, now versioned artifacts are resolved, but not versioned plugins.

/[ERROR]     Unresolveable build extension: Plugin nl.innovationinvestments:CheyenneMavenPlugin:1.11-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact nl.innovationinvestments:CheyenneMavenPlugin:jar:1.11-SNAPSHOT in kp (http://alaya.applicationplaza.com:8081/nexus/content/groups/public) -> [Help 2]
/
There is a versioned plugin available in Nexus.

So upgrading Nexus to 1.8 could solve this?

Tom

Re: maven 3 snapshot resolving

Posted by Tom <tb...@tbee.org>.
  My snapshot repositories were configured using <uniqueVersion>false</uniqueVersion>. Maven 3 does not seem to respect that when releasing and releases with a date-time anyhow, but does respect it when resolving and does not find the date-time files. By modifying uniqueVersion to true, it seems to work.

Further testing is required, but this matches the behavior.

Tom

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


Re: maven 3 snapshot resolving

Posted by Benjamin Bentmann <be...@udo.edu>.
Tom wrote:

> This wiki refers to Maven 2 clients having problems

 From that wiki:

"Additionally, some repository managers [...] may not cope with the 
additional XML elements in the metadata file."

This applies to (unpatched) Nexus versions before 1.8 where the issue 
manifests itself as the server not being able to serve the metadata from 
a group repository. And the failure to deliver this metadata prevents 
Maven from finding the snapshot.


Benjamin

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


Re: maven 3 snapshot resolving

Posted by Tom <tb...@tbee.org>.
  This wiki refers to Maven 2 clients having problems accessing Maven 3 artifacts. In my situation Maven 3 clients are the problem; they does not seem to find the artifacts it deployed itself. So that would not be "activating legacy behavior".




On 27-10-2010 14:47, Benjamin Bentmann wrote:
> Tom wrote:
>
>> Could not
>> find artifact nl.innovationinvestments:CheyenneServlet:jar:1.11-SNAPSHOT
>> in kp (http://alaya.applicationplaza.com:8081/nexus/content/groups/pub
>> lic)
>
> Could be related to [0], i.e. a problem with the metadata that Maven requires to locate the timestamped snapshot. Either try using the system property mentioned in the wiki article to deploy legacy metadata or update/patch your Nexus instance.
>
>
> Benjamin
>
>
> [0] https://cwiki.apache.org/confluence/display/MAVEN/Maven+3.x+Compatibility+Notes#Maven3.xCompatibilityNotes-UniqueSnapshotVersionsandClassifiers
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>


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


Re: maven 3 snapshot resolving

Posted by Benjamin Bentmann <be...@udo.edu>.
Tom wrote:

> Could not
> find artifact nl.innovationinvestments:CheyenneServlet:jar:1.11-SNAPSHOT
> in kp (http://alaya.applicationplaza.com:8081/nexus/content/groups/pub
> lic)

Could be related to [0], i.e. a problem with the metadata that Maven 
requires to locate the timestamped snapshot. Either try using the system 
property mentioned in the wiki article to deploy legacy metadata or 
update/patch your Nexus instance.


Benjamin


[0] 
https://cwiki.apache.org/confluence/display/MAVEN/Maven+3.x+Compatibility+Notes#Maven3.xCompatibilityNotes-UniqueSnapshotVersionsandClassifiers

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