Maven
  1. Maven
  2. MNG-4433

[regression] command line option "-update-snapshots" does not work for parent POMs

    Details

    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      As reported by Julien Henry, it appears -U is not working for parent POMs.

        Issue Links

          Activity

          Hide
          Benjamin Bentmann added a comment -

          Fixed in r834587.

          Show
          Benjamin Bentmann added a comment - Fixed in r834587 .
          Hide
          Peter Niederwieser added a comment - - edited

          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.

          Show
          Peter Niederwieser added a comment - - edited 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.

            People

            • Assignee:
              Benjamin Bentmann
              Reporter:
              Benjamin Bentmann
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: