You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Roger Butenuth (JIRA)" <ji...@codehaus.org> on 2006/05/30 10:03:45 UTC

[jira] Commented: (MNG-2289) Newer SNAPSHOT parents in the remote repository are ignored

    [ http://jira.codehaus.org/browse/MNG-2289?page=comments#action_66153 ] 

Roger Butenuth commented on MNG-2289:
-------------------------------------

The problem seems to be more general for me:

We use maven 2 to build a large project consisting of several modules. 
Dependencies between modules are handled by the maven dependency 
mechanism. During development, we want to use the SNAPSHOT feature 
because we don't want to have an inflation of version numbers.

The problem: For me it looks like snapshots are never updated in the 
local repository.

To track this down, I have done the following test:

1. Deploy "interface" to our central repository 2. Compile "client" 
(which depends on "interface")
   pom, jar and metadata are downloaded into local repository.
3. Increased version number and timestamp in the file
   1.0-SNAPSHOT/maven-metadata.xml, recomputed checksums.
4. Run "mvn -U clean compile" on module "client".
This results in the following log:

[INFO] Scanning for projects...
[INFO]
--------------------------------------------------------------
--------------
[INFO] Building Client for the great calculator
[INFO]    task-segment: [clean, compile]
[INFO]
--------------------------------------------------------------
--------------
[INFO] artifact org.apache.maven.plugins:maven-clean-plugin:
checking for updates from central
[INFO] artifact org.apache.maven.plugins:maven-source-plugin:
checking for updates from central
[INFO] artifact
org.apache.maven.plugins:maven-surefire-plugin: checking for updates 
from central [INFO] [clean:clean] [INFO] Deleting directory 
c:\example\client\target [INFO] Deleting directory 
c:\example\client\target\classes [INFO] Deleting directory 
c:\example\client\target\test-classes
[INFO] artifact org.apache.maven.plugins:maven-resources-plugin:
checking for updates from central [INFO] artifact
org.apache.maven.plugins:maven-compiler-plugin: checking for updates 
from central [INFO] [source-download:download-sources {execution:
default}]

-----> [INFO] snapshot
de.sdm.calculator:interface:1.0-SNAPSHOT: checking for updates from 
central <------

[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources. [INFO] 
snapshot de.sdm.calculator:calculator-all:1.0-SNAPSHOT: checking for 
updates from central [INFO] [compiler:compile] Compiling 1 source file 
to c:\example\client\target\classes [INFO]
--------------------------------------------------------------
----------
[INFO] BUILD SUCCESSFUL

As you can see in the marked line, the check for updates is done. 
Looking into ~/.m2/repository I can see even the new 
maven-metadata-central.xml (new timestamp, new content), but the jar 
is NOT updated from the server.

Is this intendented behaviour?

I can solve the problem by setting
<uniqueVersion>true</uniqueVersion> master pom of the project, but 
this clobberes the local repositories of all users and the central 
repository with lots of old versions.


> Newer SNAPSHOT parents in the remote repository are ignored
> -----------------------------------------------------------
>
>          Key: MNG-2289
>          URL: http://jira.codehaus.org/browse/MNG-2289
>      Project: Maven 2
>         Type: Bug

>   Components: Inheritence and Interpolation
>     Versions: 2.0.4
>     Reporter: Joerg Schaible
>     Priority: Critical

>
>
> If a POM inherits from another one in the repository with a SNAPSHOT version, it will only look into the local repository for it, but not in the remote repositories.
> E.g. if a POM has following parent:
> {noformat}
> ...
>     <parent>
>         <groupId>pom.maven</groupId>
>         <artifactId>super</artifactId>
>         <version>SNAPSHOT</version>
>     </parent>
> ...
> {noformat}
> it will not find a newer version of "pom.maven:super:SNAPSHOT" in a remote repository.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira