mvn -nsu (--no-snapshot-updates) is still downloading SNAPSHOT versions
Hi, At our project we recently had an issue where we accidentally included outdated artifacts (which were still available on snapshot repositories). To detect those issues in the future by our integration tests, I want to instruct maven not to download snapshot updates, using the -nsu command line argument. However, doing mvn clean install -nsu -DskipTests -Dmaven.repo.local=/tmp/test-mvn will still lead to: [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.xmlDownloaded: 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.pomDownloaded: 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.jarDownloaded: 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) I've added the steps to reproduce here: https://issues.apache.org/jira/browse/MNG-5064?focusedCommentId=14551952page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14551952 I would like to know whether I misunderstood the feature or if this is a bug. Best, Robert
Re: mvn -nsu (--no-snapshot-updates) is still downloading SNAPSHOT versions
Maven is not downloading updates, but only the SNAPSHOTS it is missing. If you build another time it won't download anything and even if your update window (mostly daily) has been passed Maven will not look for new updates but use the ones it has locally. If you want to know which dependencies needs updates you can use the versions plugin. - versions:display-dependency-updates http://mojo.codehaus.org/versions-maven-plugin/display-dependency-updates-mojo.html scans a project's dependencies and produces a report of those dependencies which have newer versions available. - versions:display-plugin-updates http://mojo.codehaus.org/versions-maven-plugin/display-plugin-updates-mojo.html scans a project's plugins and produces a report of those plugins which have newer versions available. - versions:display-property-updates http://mojo.codehaus.org/versions-maven-plugin/display-property-updates-mojo.html scans a projectand produces a report of those properties which are used to control artifact versions and which properies have newer versions available. Hth, Nick Stolwijk ~~~ Try to leave this world a little better than you found it and, when your turn comes to die, you can die happy in feeling that at any rate you have not wasted your time but have done your best ~~~ Lord Baden-Powell On Tue, May 26, 2015 at 11:18 AM, Robert Metzger rmetz...@apache.org wrote: Hi, At our project we recently had an issue where we accidentally included outdated artifacts (which were still available on snapshot repositories). To detect those issues in the future by our integration tests, I want to instruct maven not to download snapshot updates, using the -nsu command line argument. However, doing mvn clean install -nsu -DskipTests -Dmaven.repo.local=/tmp/test-mvn will still lead to: [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.xmlDownloaded : 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.pomDownloaded : 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.jarDownloaded : 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) I've added the steps to reproduce here: https://issues.apache.org/jira/browse/MNG-5064?focusedCommentId=14551952page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14551952 I would like to know whether I misunderstood the feature or if this is a bug. Best, Robert
Re: mvn -nsu (--no-snapshot-updates) is still downloading SNAPSHOT versions
Thank you Nick. Your solution would work, but would require us to let users call a bash script which is calling versions:display-dependency-updates and then doing the regular build. We would like to run our builds directly by mvn clean install. Is there a way to let a maven build fail if we depend on nonexistent or SNAPSHOT dependencies? So what happened in our project is the following: We renamed a module from flink-compiler to flink-optimizer. While merging some older patches, a new module was still depending on flink-compiler (the old name) and we didn't notice this because maven was getting the flink-compiler file from apache's snapshot repository. Ideally, the maven build should fail when somebody is doing mvn clean install. On Tue, May 26, 2015 at 11:30 AM, Nick Stolwijk nick.stolw...@gmail.com wrote: Maven is not downloading updates, but only the SNAPSHOTS it is missing. If you build another time it won't download anything and even if your update window (mostly daily) has been passed Maven will not look for new updates but use the ones it has locally. If you want to know which dependencies needs updates you can use the versions plugin. - versions:display-dependency-updates http://mojo.codehaus.org/versions-maven-plugin/display-dependency-updates-mojo.html scans a project's dependencies and produces a report of those dependencies which have newer versions available. - versions:display-plugin-updates http://mojo.codehaus.org/versions-maven-plugin/display-plugin-updates-mojo.html scans a project's plugins and produces a report of those plugins which have newer versions available. - versions:display-property-updates http://mojo.codehaus.org/versions-maven-plugin/display-property-updates-mojo.html scans a projectand produces a report of those properties which are used to control artifact versions and which properies have newer versions available. Hth, Nick Stolwijk ~~~ Try to leave this world a little better than you found it and, when your turn comes to die, you can die happy in feeling that at any rate you have not wasted your time but have done your best ~~~ Lord Baden-Powell On Tue, May 26, 2015 at 11:18 AM, Robert Metzger rmetz...@apache.org wrote: Hi, At our project we recently had an issue where we accidentally included outdated artifacts (which were still available on snapshot repositories). To detect those issues in the future by our integration tests, I want to instruct maven not to download snapshot updates, using the -nsu command line argument. However, doing mvn clean install -nsu -DskipTests -Dmaven.repo.local=/tmp/test-mvn will still lead to: [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.xmlDownloaded : 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.pomDownloaded : 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.jarDownloaded : 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) I've added the steps to reproduce here: https://issues.apache.org/jira/browse/MNG-5064?focusedCommentId=14551952page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14551952 I would like to know whether I misunderstood the feature or if this is a bug. Best, Robert
Re: mvn -nsu (--no-snapshot-updates) is still downloading SNAPSHOT versions
Hi Robert, Is there a way to let a maven build fail if we depend on nonexistent or SNAPSHOT dependencies? Check out the requireReleaseDeps rule of the Maven Enforcer plugin: http://maven.apache.org/enforcer/enforcer-rules/requireReleaseDeps.html Regards, Curtis On Tue, May 26, 2015 at 6:55 AM, Robert Metzger rmetz...@apache.org wrote: Thank you Nick. Your solution would work, but would require us to let users call a bash script which is calling versions:display-dependency-updates and then doing the regular build. We would like to run our builds directly by mvn clean install. Is there a way to let a maven build fail if we depend on nonexistent or SNAPSHOT dependencies? So what happened in our project is the following: We renamed a module from flink-compiler to flink-optimizer. While merging some older patches, a new module was still depending on flink-compiler (the old name) and we didn't notice this because maven was getting the flink-compiler file from apache's snapshot repository. Ideally, the maven build should fail when somebody is doing mvn clean install. On Tue, May 26, 2015 at 11:30 AM, Nick Stolwijk nick.stolw...@gmail.com wrote: Maven is not downloading updates, but only the SNAPSHOTS it is missing. If you build another time it won't download anything and even if your update window (mostly daily) has been passed Maven will not look for new updates but use the ones it has locally. If you want to know which dependencies needs updates you can use the versions plugin. - versions:display-dependency-updates http://mojo.codehaus.org/versions-maven-plugin/display-dependency-updates-mojo.html scans a project's dependencies and produces a report of those dependencies which have newer versions available. - versions:display-plugin-updates http://mojo.codehaus.org/versions-maven-plugin/display-plugin-updates-mojo.html scans a project's plugins and produces a report of those plugins which have newer versions available. - versions:display-property-updates http://mojo.codehaus.org/versions-maven-plugin/display-property-updates-mojo.html scans a projectand produces a report of those properties which are used to control artifact versions and which properies have newer versions available. Hth, Nick Stolwijk ~~~ Try to leave this world a little better than you found it and, when your turn comes to die, you can die happy in feeling that at any rate you have not wasted your time but have done your best ~~~ Lord Baden-Powell On Tue, May 26, 2015 at 11:18 AM, Robert Metzger rmetz...@apache.org wrote: Hi, At our project we recently had an issue where we accidentally included outdated artifacts (which were still available on snapshot repositories). To detect those issues in the future by our integration tests, I want to instruct maven not to download snapshot updates, using the -nsu command line argument. However, doing mvn clean install -nsu -DskipTests -Dmaven.repo.local=/tmp/test-mvn will still lead to: [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.xmlDownloaded : 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.pomDownloaded : 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.jarDownloaded : 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) I've added the steps to reproduce here: https://issues.apache.org/jira/browse/MNG-5064?focusedCommentId=14551952page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14551952 I would like to know whether I misunderstood the feature or if this is a bug. Best, Robert