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

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@codehaus.org
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

Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@codehaus.org
    [ 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

Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org
    [ http://jira.codehaus.org/browse/MNG-2289?page=comments#action_66211 ]

Carlos Sanchez commented on MNG-2289:
-------------------------------------

can you provide a test case in code, please?

> 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

Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org
     [ http://jira.codehaus.org/browse/MNG-2289?page=all ]

Roger Butenuth updated MNG-2289:
--------------------------------

    Attachment: example.zip

> 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
>  Attachments: example.zip
>
>
> 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

Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org
     [ http://jira.codehaus.org/browse/MNG-2289?page=all ]

Joerg Schaible updated MNG-2289:
--------------------------------

    Attachment: mng2289.zip

> 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
>  Attachments: example.zip, mng2289.zip
>
>
> 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

Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org
    [ http://jira.codehaus.org/browse/MNG-2289?page=comments#action_66483 ]

Federico commented on MNG-2289:
-------------------------------

Hi,
we have the same problem when using the following configuration in our POM:

> 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
>  Attachments: example.zip, mng2289.zip
>
>
> 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

Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org
    [ http://jira.codehaus.org/browse/MNG-2289?page=comments#action_66485 ]

Federico commented on MNG-2289:
-------------------------------

Hi,
we have the same problem when using the following configuration in our POM:
 
   <snapshotRepository>
        <id>internalRepo</id>
        <name>our company internal repo</name>
        <url>ftp://maven.xxx.xxx/opt/repository/maven</url>
        <!-- uniqueVersion == false is needed to upload snapshots releases
        without changing fileName to timestamp+buildNumber.
        All deployment will override the -SNAPSHOT files on the repo. -->
        <uniqueVersion>false</uniqueVersion>
      </snapshotRepository>

during deploy phase the -SNAPSHOT.jar on the server is overridden by the newer one and maven-metadata.xml is updated properly but when another client run maven (and has already the older version of the SNAPSHOT in its local repository) it doesn't download the newer pom and jar.

maven (with debug enabled says):
[DEBUG] Retrieving parent-POM: xxx:yyy::0.3.1-SNAPSHOT for project: xxx:zzz:jar:0.3.1-SNAPSHOT from the repository.
[DEBUG] yyy: using locally installed snapshot

if we run on the client maven with the -U option we get:
[DEBUG] Retrieving parent-POM: xxx:yyy::0.3.1-SNAPSHOT for project: xxx:yyy:jar:0.3.1-SNAPSHOT from the repository.
[INFO] snapshot xxx:yyy:0.3.1-SNAPSHOT: checking for updates from internalRepo
[INFO] snapshot xxx:yyy:0.3.1-SNAPSHOT: checking for updates from central
[DEBUG] repository metadata for: 'snapshot xxx:yyy:0.3.1-SNAPSHOT' could not be found on repository: central
[DEBUG] yyy: using locally installed snapshot

in both cases maven is not downloading the newest POM.
Another strange thing is that after looking in our internalRepo it still looks in the central repo if the metadata are there. Maven should have found metadata information in our internalRepo (infact it DOES NOT give out the error (repository metadata for: 'snapshot xxx:yyy:0.3.1-SNAPSHOT' could not be found on repository: internalRepo). It seems maven find the metadata on our repo but not consider it.

let me know if I can do some more test,
best regards,
Federico

> 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
>  Attachments: example.zip, mng2289.zip
>
>
> 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

Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org
     [ http://jira.codehaus.org/browse/MNG-2289?page=all ]

Carlos Sanchez updated MNG-2289:
--------------------------------

    Testcase included: yes
          Fix Version: 2.0.5

> 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
>      Fix For: 2.0.5
>  Attachments: example.zip, mng2289.zip
>
>
> 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