You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Matthew McCullough (JIRA)" <ji...@codehaus.org> on 2010/01/19 06:13:56 UTC

[jira] Created: (MNG-4537) --update-snapshots command line option flag is misleading, as it actually updates releases too

--update-snapshots command line option flag is misleading, as it actually updates releases too
----------------------------------------------------------------------------------------------

                 Key: MNG-4537
                 URL: http://jira.codehaus.org/browse/MNG-4537
             Project: Maven 2 & 3
          Issue Type: Improvement
          Components: Command Line
    Affects Versions: 3.0-alpha-6, 3.0-alpha-5, 2.2.1, 2.0.10, 2.0.9
            Reporter: Matthew McCullough
         Attachments: remove-misleading-updatesnapshots-option.patch

Had a discussion with Brett Porter, Brian Fox, and Benjamin Bentmann on IRC about how the --update-snapshots command line option is misleading.  I, as well as some of my students, we using -up, expecting downloads that previously failed to be tried again.  However, that flag only checks for metadata updates to see if a newer version of the plugin has been released.  What we were after is the -U flag (synonymous with --update-snapshots) which also checks again remotely for SNAPSHOT and RELEASE downloads that previously failed.

Brett and Brian suggested that we either deprecate the old --update-snapshots long option, but that's not entirely possible since the short and long options are tied together.  So, as a compromise solution, I'm indicating that the --update-snapshots option flag (name) may go away in the future and adding a migrate-to option called --update-all which was suggested in the above IRC conversation.  Functionally, this long flag performs the same operation as --update-snapshots, but the name much more effectively communicates that it updates all artifacts from remote repos, not just snapshots.

-- 
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

        

[jira] Commented: (MNG-4537) --update-snapshots command line option flag is misleading, as it actually updates releases too

Posted by "Matthew McCullough (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=207402#action_207402 ] 

Matthew McCullough commented on MNG-4537:
-----------------------------------------

When an artifact is not found, it points to [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

Benjamin and I have added an update and a comment respectively to this page to clarify the usage of -U for forcing an update of artifacts.


[sample-webapp]> mvn package
Using Java version: 1.6
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.ambientideas:sample-webapp:war:1.0-SNAPSHOT
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead. @ com.ambientideas:sample-webapp:1.0-SNAPSHOT, /Users/mccm06/Documents/Temp/Scratch/sample-webapp/pom.xml
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building sample-webapp Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.325s
[INFO] Finished at: Mon Jan 18 14:33:51 MST 2010
[INFO] Final Memory: 3M/80M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.mule.galaxy:galaxy-maven-publish-plugin:2.0-M4 or one of its dependencies could not be resolved: Missing:
----------
1) org.mule.galaxy:galaxy-maven-publish-plugin:maven-plugin:2.0-M4

  Try downloading the file manually from the project website.

  Then, install it using the command: 
      mvn install:install-file -DgroupId=org.mule.galaxy -DartifactId=galaxy-maven-publish-plugin -Dversion=2.0-M4 -Dpackaging=maven-plugin -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there: 
      mvn deploy:deploy-file -DgroupId=org.mule.galaxy -DartifactId=galaxy-maven-publish-plugin -Dversion=2.0-M4 -Dpackaging=maven-plugin -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

----------
1 required artifact is missing.

for artifact: 
  org.mule.galaxy:galaxy-maven-publish-plugin:maven-plugin:2.0-M4

from the specified remote repositories:
  nexus-public-releases (http://localhost:8081/nexus/content/groups/public, releases=true, snapshots=true)
-> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException


> --update-snapshots command line option flag is misleading, as it actually updates releases too
> ----------------------------------------------------------------------------------------------
>
>                 Key: MNG-4537
>                 URL: http://jira.codehaus.org/browse/MNG-4537
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: Command Line
>    Affects Versions: 2.0.9, 2.0.10, 2.2.1, 3.0-alpha-5, 3.0-alpha-6
>            Reporter: Matthew McCullough
>         Attachments: remove-misleading-updatesnapshots-option.patch
>
>
> Had a discussion with Brett Porter, Brian Fox, and Benjamin Bentmann on IRC about how the --update-snapshots command line option is misleading.  I, as well as some of my students, we using -up, expecting downloads that previously failed to be tried again.  However, that flag only checks for metadata updates to see if a newer version of the plugin has been released.  What we were after is the -U flag (synonymous with --update-snapshots) which also checks again remotely for SNAPSHOT and RELEASE downloads that previously failed.
> Brett and Brian suggested that we either deprecate the old --update-snapshots long option, but that's not entirely possible since the short and long options are tied together.  So, as a compromise solution, I'm indicating that the --update-snapshots option flag (name) may go away in the future and adding a migrate-to option called --update-all which was suggested in the above IRC conversation.  Functionally, this long flag performs the same operation as --update-snapshots, but the name much more effectively communicates that it updates all artifacts from remote repos, not just snapshots.

-- 
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