Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-4587

command line option "-update-snapshots" does not work for parent POMs (Maven 2 also affected)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Won't Fix
    • 2.2.1
    • None
    • None

    Description

      Since I didn't get any response to my comment on MNG-4433, I've opened a new issue. The following is from my original comment.

      I have exactly the same issue with 2.2.1. After changing and deploying parent POM, I run build with -U (on a different machine). Excerpt from output:

      [INFO] snapshot org.spockframework:spock-parent:0.4-groovy-1.7-SNAPSHOT: checking for updates from central
      [17:48:33]: Downloading: http://xxx/artifactory/repo/org/spockframework/spock-parent/0.4-groovy-1.7-SNAPSHOT/spock-parent-0.4-groovy-1.7-SNAPSHOT.pom
      [17:48:33]: Downloading: http://xxx/artifactory/repo/org/spockframework/spock-maven/0.4-groovy-1.7-SNAPSHOT/spock-maven-0.4-groovy-1.7-SNAPSHOT.jar
      

      Maven says that it is downloading spock-parent POM, but it doesn't end up in the local repo. Compare to the output after manually deleting the old POM from the local repo:

      [INFO] snapshot org.spockframework:spock-parent:0.4-groovy-1.7-SNAPSHOT: checking for updates from central
      Downloading: http://xxx/artifactory/repo/org/spockframework/spock-parent/0.4-groovy-1.7-SNAPSHOT/spock-parent-0.4-groovy-1.7-SNAPSHOT.pom
      8K downloaded  (spock-parent-0.4-groovy-1.7-SNAPSHOT.pom)
      

      Here we get "8K downloaded", which we didn't get before. The local repo now contains the correct POM, and the build succeeds.

      Here is what the local repo looked like before I manually deleted the old POM:

      drwxr-xr-x  6 pniederw  admin   204 Mar  5 16:48 .
      drwxr-xr-x  3 pniederw  admin   102 Dec 14 13:47 ..
      -rw-r--r--  1 pniederw  admin   331 Mar  5 16:48 maven-metadata-central.xml
      -rw-r--r--  1 pniederw  admin    40 Mar  5 16:48 maven-metadata-central.xml.sha1
      -rw-r--r--  1 pniederw  admin  9048 Mar  5 16:48 spock-parent-0.4-groovy-1.7-SNAPSHOT.pom
      -rw-r--r--  1 pniederw  admin    40 Dec 14 13:47 spock-parent-0.4-groovy-1.7-SNAPSHOT.pom.sha1
      

      As you can see, the POM's last modified date is recent, but nevertheless the content is old. In fact it still matches the pom.sha1, which was last updated in December! How is this possible?
      This is a very insidious bug, and you would help a lot of people by fixing it ASAP.

      Attachments

        Issue Links

          Activity

            People

              brett Brett Porter
              pniederw Peter Niederwieser
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: