You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Metzger (JIRA)" <ji...@apache.org> on 2015/05/20 09:50:00 UTC

[jira] [Commented] (MNG-5064) mvn -nsu (--no-snapshot-updates) should not download snapshots (and break local builds)

    [ https://issues.apache.org/jira/browse/MNG-5064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14551952#comment-14551952 ] 

Robert Metzger commented on MNG-5064:
-------------------------------------

I would like to reopen this issue, because -nsu is not working as expected in Maven 3.2.5.

Steps to reproduce:
{code}
mvn -v
Apache Maven 3.2.5 (NON-CANONICAL_2014-12-25T17:13:28_root; 2014-12-25T14:13:28+01:00)
Maven home: /opt/maven
Java version: 1.7.0_75, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.18.6-1-arch", arch: "amd64", family: "unix"

robert@robert-da /tmp % git clone https://github.com/apache/flink.git
Cloning into 'flink'...
remote: Counting objects: 212056, done.
remote: Total 212056 (delta 0), reused 0 (delta 0), pack-reused 212056
Receiving objects: 100% (212056/212056), 47.07 MiB | 10.89 MiB/s, done.
Resolving deltas: 100% (102610/102610), done.
Checking connectivity... done.
robert@robert-da /tmp % cd flink
robert@robert-da /tmp/flink (git)-[master] % git checkout 912f8d90efef2912bd9aac7c0b44d05fd90d6803
Note: checking out '912f8d90efef2912bd9aac7c0b44d05fd90d6803'.
HEAD is now at 912f8d9... [gelly] renamed IncrementalSSSPExample -> IncrementalSSSP to match the new examples naming scheme
robert@robert-da /tmp/flink (git)-[heads/master] % mvn clean install -nsu -DskipTests -Dmaven.repo.local=/tmp/test-mvn

{code}

later, you'll see:
{code}
[INFO] ------------------------------------------------------------------------
[INFO] Building flink-language-binding-generic 0.9-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repository.apache.org/snapshots/org/apache/flink/flink-compiler/0.9-SNAPSHOT/maven-metadata.xml
Downloaded: http://repository.apache.org/snapshots/org/apache/flink/flink-compiler/0.9-SNAPSHOT/maven-metadata.xml (2 KB at 0.8 KB/sec)
Downloading: http://repository.apache.org/snapshots/org/apache/flink/flink-compiler/0.9-SNAPSHOT/flink-compiler-0.9-20150313.122611-190.pom
Downloaded: http://repository.apache.org/snapshots/org/apache/flink/flink-compiler/0.9-SNAPSHOT/flink-compiler-0.9-20150313.122611-190.pom (4 KB at 5.7 KB/sec)
Downloading: http://repository.apache.org/snapshots/org/apache/flink/flink-compiler/0.9-SNAPSHOT/flink-compiler-0.9-20150313.122611-190.jar
Downloaded: http://repository.apache.org/snapshots/org/apache/flink/flink-compiler/0.9-SNAPSHOT/flink-compiler-0.9-20150313.122611-190.jar (2660 KB at 379.7 KB/sec)
{code}

and the build finishing with success, even though maven was downloading outdated snapshot versions.

> mvn -nsu (--no-snapshot-updates) should not download snapshots (and break local builds)
> ---------------------------------------------------------------------------------------
>
>                 Key: MNG-5064
>                 URL: https://issues.apache.org/jira/browse/MNG-5064
>             Project: Maven
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 3.0.3
>            Reporter: Geoffrey De Smet
>            Assignee: Benjamin Bentmann
>            Priority: Critical
>             Fix For: 3.0.4
>
>
> Here's the command I ran (on a fresh morning, because our update policy is daily and our SNAPSHOTs are deployed by Hudson at night, with maven 3.0.3):
> {code}
> $ mvn -nsu clean install -DskipTests
> [INFO] Scanning for projects...
> Downloading: http://repository.jboss.org/nexus/content/groups/public/org/drools/droolsjbpm-parent/5.2.0-SNAPSHOT/maven-metadata.xml
> ...
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Drools Planner core 5.2.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> Downloading: http://repository.jboss.org/nexus/content/groups/public/org/drools/knowledge-api/5.2.0-SNAPSHOT/maven-metadata.xml
> Downloaded: http://repository.jboss.org/nexus/content/groups/public/org/drools/knowledge-api/5.2.0-SNAPSHOT/maven-metadata.xml (2 KB at 1.8 KB/sec)
> Downloading: http://repository.jboss.org/nexus/content/groups/public/org/drools/knowledge-api/5.2.0-SNAPSHOT/knowledge-api-5.2.0-20110413.010206-9.pom
> Downloaded: http://repository.jboss.org/nexus/content/groups/public/org/drools/knowledge-api/5.2.0-SNAPSHOT/knowledge-api-5.2.0-20110413.010206-9.pom (6 KB at 6.0 KB/sec)
> ...
> Downloading: http://repository.jboss.org/nexus/content/groups/public/org/drools/knowledge-api/5.2.0-SNAPSHOT/knowledge-api-5.2.0-20110413.010206-9.jar
> ...
> {code}
> Despite that I added "-nsu" (also known as "--no-snapshot-updates"), it downloaded snapshots.
> This is a pretty bad thing, because if I hadn't pulled in days (and just wanted to test my local changes before merging in remote changes),
> this would have broke my build, for example:
> - because the parent pom in downloaded SNAPSHOT had a dependency removed which my local pom was still using (because I hadn't pulled the changes yet)
> - because the downloaded knowledge-api changed a non-released method signature (and I hadn't pulled the changes to deal with that yet).
> - ...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)