Ivy
  1. Ivy
  2. IVY-1069

Ivy buildnumber task does not find artifact in Sonatype Nexus repo

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0, 2.1.0-RC1
    • Fix Version/s: 2.1.0-RC2
    • Component/s: Ant
    • Labels:
      None
    • Environment:

      Linux,Windows, Sonatype Nexus 1.3.1.1, Ant 1.7.1, JDK 1.6

      Description

      When trying to find the new revision based on the artifacts published in Nexus repo, the buildnumber task is unable to find the correct artifacts in the repo which leads to incorrect new revision being calculated.

      Further investigation leads to this:
      1. When using "hr.apisit" organisation name (contains dot in the name) the buildnumber task produces:

      [CODE]
      Property "ivy.new.revision" has not been set
      [echo] working@wonderland - $

      {ivy.new.revision}
      [echo] B22SeedBusinessServiceJava - hr.apisit
      Overriding previous definition of property "ivy.version"
      Setting project property: ivy.version -> 2.1.0-rc1
      [ivy:buildnumber] using nexus_publish to list all in http://localhost:8081/nexus/content/repositories/snapshots/
      [ivy:buildnumber] ApacheURLLister found URL=http://localhost:8081/nexus/content/repositories/snapshots/.index/.
      [ivy:buildnumber] ApacheURLLister found URL=http://localhost:8081/nexus/content/repositories/snapshots/.meta/.
      [ivy:buildnumber] ApacheURLLister found URL=http://localhost:8081/nexus/content/repositories/snapshots/hr/.
      [ivy:buildnumber] found 3 resources
      [ivy:buildnumber] using nexus_publish to list all in http://localhost:8081/nexus/content/repositories/snapshots/.index/B22SeedBusinessServiceJava
      [ivy:buildnumber] HTTP response status: 404 url=http://localhost:8081/nexus/content/repositories/snapshots/.index/B22SeedBusinessServiceJava/
      [ivy:buildnumber] CLIENT ERROR: Not Found url=http://localhost:8081/nexus/content/repositories/snapshots/.index/B22SeedBusinessServiceJava/
      [ivy:buildnumber] problem while listing resources in http://localhost:8081/nexus/content/repositories/snapshots/.index/B22SeedBusinessServiceJava with nexus_publish:
      [ivy:buildnumber] java.io.IOException The HTTP response code for http://localhost:8081/nexus/content/repositories/snapshots/.index/B22SeedBusinessServiceJava/ did not indicate a success. See log for more detail.
      [ivy:buildnumber] using nexus_publish to list all in http://localhost:8081/nexus/content/repositories/snapshots/.meta/B22SeedBusinessServiceJava
      [ivy:buildnumber] HTTP response status: 404 url=http://localhost:8081/nexus/content/repositories/snapshots/.meta/B22SeedBusinessServiceJava/
      [ivy:buildnumber] CLIENT ERROR: Not Found url=http://localhost:8081/nexus/content/repositories/snapshots/.meta/B22SeedBusinessServiceJava/
      [ivy:buildnumber] problem while listing resources in http://localhost:8081/nexus/content/repositories/snapshots/.meta/B22SeedBusinessServiceJava with nexus_publish:
      [ivy:buildnumber] java.io.IOException The HTTP response code for http://localhost:8081/nexus/content/repositories/snapshots/.meta/B22SeedBusinessServiceJava/ did not indicate a success. See log for more detail.
      [ivy:buildnumber] using nexus_publish to list all in http://localhost:8081/nexus/content/repositories/snapshots/hr/B22SeedBusinessServiceJava
      [ivy:buildnumber] HTTP response status: 404 url=http://localhost:8081/nexus/content/repositories/snapshots/hr/B22SeedBusinessServiceJava/
      [ivy:buildnumber] CLIENT ERROR: Not Found url=http://localhost:8081/nexus/content/repositories/snapshots/hr/B22SeedBusinessServiceJava/
      [ivy:buildnumber] problem while listing resources in http://localhost:8081/nexus/content/repositories/snapshots/hr/B22SeedBusinessServiceJava with nexus_publish:
      [ivy:buildnumber] java.io.IOException The HTTP response code for http://localhost:8081/nexus/content/repositories/snapshots/hr/B22SeedBusinessServiceJava/ did not indicate a success. See log for more detail.
      [ivy:buildnumber] using nexus_publish to list all in http://localhost:8081/nexus/content/repositories/snapshots/
      [ivy:buildnumber] ApacheURLLister found URL=http://localhost:8081/nexus/content/repositories/snapshots/.index/.
      [ivy:buildnumber] ApacheURLLister found URL=http://localhost:8081/nexus/content/repositories/snapshots/.meta/.
      [ivy:buildnumber] ApacheURLLister found URL=http://localhost:8081/nexus/content/repositories/snapshots/hr/.
      [ivy:buildnumber] found 3 resources
      [ivy:buildnumber] using nexus_publish to list all in http://localhost:8081/nexus/content/repositories/snapshots/.index/B22SeedBusinessServiceJava
      [ivy:buildnumber] HTTP response status: 404 url=http://localhost:8081/nexus/content/repositories/snapshots/.index/B22SeedBusinessServiceJava/
      [ivy:buildnumber] CLIENT ERROR: Not Found url=http://localhost:8081/nexus/content/repositories/snapshots/.index/B22SeedBusinessServiceJava/
      [ivy:buildnumber] problem while listing resources in http://localhost:8081/nexus/content/repositories/snapshots/.index/B22SeedBusinessServiceJava with nexus_publish:
      [ivy:buildnumber] java.io.IOException The HTTP response code for http://localhost:8081/nexus/content/repositories/snapshots/.index/B22SeedBusinessServiceJava/ did not indicate a success. See log for more detail.
      [ivy:buildnumber] using nexus_publish to list all in http://localhost:8081/nexus/content/repositories/snapshots/.meta/B22SeedBusinessServiceJava
      [ivy:buildnumber] HTTP response status: 404 url=http://localhost:8081/nexus/content/repositories/snapshots/.meta/B22SeedBusinessServiceJava/
      [ivy:buildnumber] CLIENT ERROR: Not Found url=http://localhost:8081/nexus/content/repositories/snapshots/.meta/B22SeedBusinessServiceJava/
      [ivy:buildnumber] problem while listing resources in http://localhost:8081/nexus/content/repositories/snapshots/.meta/B22SeedBusinessServiceJava with nexus_publish:
      [ivy:buildnumber] java.io.IOException The HTTP response code for http://localhost:8081/nexus/content/repositories/snapshots/.meta/B22SeedBusinessServiceJava/ did not indicate a success. See log for more detail.
      [ivy:buildnumber] using nexus_publish to list all in http://localhost:8081/nexus/content/repositories/snapshots/hr/B22SeedBusinessServiceJava
      [ivy:buildnumber] HTTP response status: 404 url=http://localhost:8081/nexus/content/repositories/snapshots/hr/B22SeedBusinessServiceJava/
      [ivy:buildnumber] CLIENT ERROR: Not Found url=http://localhost:8081/nexus/content/repositories/snapshots/hr/B22SeedBusinessServiceJava/
      [ivy:buildnumber] problem while listing resources in http://localhost:8081/nexus/content/repositories/snapshots/hr/B22SeedBusinessServiceJava with nexus_publish:
      [ivy:buildnumber] java.io.IOException The HTTP response code for http://localhost:8081/nexus/content/repositories/snapshots/hr/B22SeedBusinessServiceJava/ did not indicate a success. See log for more detail.
      Setting project property: ivy.new.revision -> 1.0.0
      Setting project property: ivy.new.build.number -> 0
      [echo] working@wonderland - 1.0.0
      BUILD SUCCESSFUL
      Total time: 4 seconds
      [/CODE]

      The issue is that the artifacts are being looked up in the repo wih the URL "http://localhost:8081/nexus/content/repositories/snapshots/hr/" instead of
      "http://localhost:8081/nexus/content/repositories/snapshots/hr/apisit"

      2. When the organisation name is "simple" (no dots)- for instance "apisit", everything goes well:

      [CODE]
      Property "ivy.new.revision" has not been set
      [echo] working@wonderland - ${ivy.new.revision}

      [echo] B22SeedBusinessServiceJava - apisit
      Overriding previous definition of property "ivy.version"
      Setting project property: ivy.version -> 2.1.0-rc1
      [ivy:buildnumber] using nexus_publish to list all in http://localhost:8081/nexus/content/repositories/snapshots/
      [ivy:buildnumber] ApacheURLLister found URL=http://localhost:8081/nexus/content/repositories/snapshots/.index/.
      [ivy:buildnumber] ApacheURLLister found URL=http://localhost:8081/nexus/content/repositories/snapshots/.meta/.
      [ivy:buildnumber] ApacheURLLister found URL=http://localhost:8081/nexus/content/repositories/snapshots/apisit/.
      [ivy:buildnumber] ApacheURLLister found URL=http://localhost:8081/nexus/content/repositories/snapshots/hr/.
      [ivy:buildnumber] found 4 resources
      [ivy:buildnumber] using nexus_publish to list all in http://localhost:8081/nexus/content/repositories/snapshots/.index/B22SeedBusinessServiceJava
      [ivy:buildnumber] HTTP response status: 404 url=http://localhost:8081/nexus/content/repositories/snapshots/.index/B22SeedBusinessServiceJava/
      [ivy:buildnumber] CLIENT ERROR: Not Found url=http://localhost:8081/nexus/content/repositories/snapshots/.index/B22SeedBusinessServiceJava/
      [ivy:buildnumber] problem while listing resources in http://localhost:8081/nexus/content/repositories/snapshots/.index/B22SeedBusinessServiceJava with nexus_publish:
      [ivy:buildnumber] java.io.IOException The HTTP response code for http://localhost:8081/nexus/content/repositories/snapshots/.index/B22SeedBusinessServiceJava/ did not indicate a success. See log for more detail.
      [ivy:buildnumber] using nexus_publish to list all in http://localhost:8081/nexus/content/repositories/snapshots/.meta/B22SeedBusinessServiceJava
      [ivy:buildnumber] HTTP response status: 404 url=http://localhost:8081/nexus/content/repositories/snapshots/.meta/B22SeedBusinessServiceJava/
      [ivy:buildnumber] CLIENT ERROR: Not Found url=http://localhost:8081/nexus/content/repositories/snapshots/.meta/B22SeedBusinessServiceJava/
      [ivy:buildnumber] problem while listing resources in http://localhost:8081/nexus/content/repositories/snapshots/.meta/B22SeedBusinessServiceJava with nexus_publish:
      [ivy:buildnumber] java.io.IOException The HTTP response code for http://localhost:8081/nexus/content/repositories/snapshots/.meta/B22SeedBusinessServiceJava/ did not indicate a success. See log for more detail.
      [ivy:buildnumber] using nexus_publish to list all in http://localhost:8081/nexus/content/repositories/snapshots/apisit/B22SeedBusinessServiceJava
      [ivy:buildnumber] ApacheURLLister found URL=http://localhost:8081/nexus/content/repositories/snapshots/apisit/B22SeedBusinessServiceJava/1.0.0-SNAPSHOT/.
      [ivy:buildnumber] found 1 urls
      [ivy:buildnumber] 1 matched http://localhost:8081/nexus/content/repositories/snapshots/apisit/B22SeedBusinessServiceJava/[revision]-SNAPSHOT/ivy-[revision].xml
      [ivy:buildnumber] using nexus_publish to list all in http://localhost:8081/nexus/content/repositories/snapshots/hr/B22SeedBusinessServiceJava
      [ivy:buildnumber] HTTP response status: 404 url=http://localhost:8081/nexus/content/repositories/snapshots/hr/B22SeedBusinessServiceJava/
      [ivy:buildnumber] CLIENT ERROR: Not Found url=http://localhost:8081/nexus/content/repositories/snapshots/hr/B22SeedBusinessServiceJava/
      [ivy:buildnumber] problem while listing resources in http://localhost:8081/nexus/content/repositories/snapshots/hr/B22SeedBusinessServiceJava with nexus_publish:
      [ivy:buildnumber] java.io.IOException The HTTP response code for http://localhost:8081/nexus/content/repositories/snapshots/hr/B22SeedBusinessServiceJava/ did not indicate a success. See log for more detail.
      [ivy:buildnumber] using nexus_publish to list all in http://localhost:8081/nexus/content/repositories/snapshots/
      [ivy:buildnumber] ApacheURLLister found URL=http://localhost:8081/nexus/content/repositories/snapshots/.index/.
      [ivy:buildnumber] ApacheURLLister found URL=http://localhost:8081/nexus/content/repositories/snapshots/.meta/.
      [ivy:buildnumber] ApacheURLLister found URL=http://localhost:8081/nexus/content/repositories/snapshots/apisit/.
      [ivy:buildnumber] ApacheURLLister found URL=http://localhost:8081/nexus/content/repositories/snapshots/hr/.
      [ivy:buildnumber] found 4 resources
      [ivy:buildnumber] using nexus_publish to list all in http://localhost:8081/nexus/content/repositories/snapshots/.index/B22SeedBusinessServiceJava
      [ivy:buildnumber] HTTP response status: 404 url=http://localhost:8081/nexus/content/repositories/snapshots/.index/B22SeedBusinessServiceJava/
      [ivy:buildnumber] CLIENT ERROR: Not Found url=http://localhost:8081/nexus/content/repositories/snapshots/.index/B22SeedBusinessServiceJava/
      [ivy:buildnumber] problem while listing resources in http://localhost:8081/nexus/content/repositories/snapshots/.index/B22SeedBusinessServiceJava with nexus_publish:
      [ivy:buildnumber] java.io.IOException The HTTP response code for http://localhost:8081/nexus/content/repositories/snapshots/.index/B22SeedBusinessServiceJava/ did not indicate a success. See log for more detail.
      [ivy:buildnumber] using nexus_publish to list all in http://localhost:8081/nexus/content/repositories/snapshots/.meta/B22SeedBusinessServiceJava
      [ivy:buildnumber] HTTP response status: 404 url=http://localhost:8081/nexus/content/repositories/snapshots/.meta/B22SeedBusinessServiceJava/
      [ivy:buildnumber] CLIENT ERROR: Not Found url=http://localhost:8081/nexus/content/repositories/snapshots/.meta/B22SeedBusinessServiceJava/
      [ivy:buildnumber] problem while listing resources in http://localhost:8081/nexus/content/repositories/snapshots/.meta/B22SeedBusinessServiceJava with nexus_publish:
      [ivy:buildnumber] java.io.IOException The HTTP response code for http://localhost:8081/nexus/content/repositories/snapshots/.meta/B22SeedBusinessServiceJava/ did not indicate a success. See log for more detail.
      [ivy:buildnumber] using nexus_publish to list all in http://localhost:8081/nexus/content/repositories/snapshots/apisit/B22SeedBusinessServiceJava
      [ivy:buildnumber] ApacheURLLister found URL=http://localhost:8081/nexus/content/repositories/snapshots/apisit/B22SeedBusinessServiceJava/1.0.0-SNAPSHOT/.
      [ivy:buildnumber] found 1 urls
      [ivy:buildnumber] 1 matched http://localhost:8081/nexus/content/repositories/snapshots/apisit/B22SeedBusinessServiceJava/[revision]-SNAPSHOT/[artifact]-[revision].jar
      [ivy:buildnumber] using nexus_publish to list all in http://localhost:8081/nexus/content/repositories/snapshots/apisit/B22SeedBusinessServiceJava/1.0.0-SNAPSHOT
      [ivy:buildnumber] ApacheURLLister found URL=http://localhost:8081/nexus/content/repositories/snapshots/apisit/B22SeedBusinessServiceJava/1.0.0-SNAPSHOT/B22SeedBusinessServiceJava-1.0.0.jar.
      [ivy:buildnumber] ApacheURLLister found URL=http://localhost:8081/nexus/content/repositories/snapshots/apisit/B22SeedBusinessServiceJava/1.0.0-SNAPSHOT/B22SeedBusinessServiceJava-1.0.0.jar.md5.
      [ivy:buildnumber] ApacheURLLister found URL=http://localhost:8081/nexus/content/repositories/snapshots/apisit/B22SeedBusinessServiceJava/1.0.0-SNAPSHOT/B22SeedBusinessServiceJava-1.0.0.jar.sha1.
      [ivy:buildnumber] ApacheURLLister found URL=http://localhost:8081/nexus/content/repositories/snapshots/apisit/B22SeedBusinessServiceJava/1.0.0-SNAPSHOT/ivy-1.0.0.xml.
      [ivy:buildnumber] ApacheURLLister found URL=http://localhost:8081/nexus/content/repositories/snapshots/apisit/B22SeedBusinessServiceJava/1.0.0-SNAPSHOT/ivy-1.0.0.xml.md5.
      [ivy:buildnumber] ApacheURLLister found URL=http://localhost:8081/nexus/content/repositories/snapshots/apisit/B22SeedBusinessServiceJava/1.0.0-SNAPSHOT/ivy-1.0.0.xml.sha1.
      [ivy:buildnumber] found 6 urls
      [ivy:buildnumber] 1 matched http://localhost:8081/nexus/content/repositories/snapshots/apisit/B22SeedBusinessServiceJava/1.0.0-SNAPSHOT/[artifact]-1.0.0.jar
      [ivy:buildnumber] using nexus_publish to list all in http://localhost:8081/nexus/content/repositories/snapshots/hr/B22SeedBusinessServiceJava
      [ivy:buildnumber] HTTP response status: 404 url=http://localhost:8081/nexus/content/repositories/snapshots/hr/B22SeedBusinessServiceJava/
      [ivy:buildnumber] CLIENT ERROR: Not Found url=http://localhost:8081/nexus/content/repositories/snapshots/hr/B22SeedBusinessServiceJava/
      [ivy:buildnumber] problem while listing resources in http://localhost:8081/nexus/content/repositories/snapshots/hr/B22SeedBusinessServiceJava with nexus_publish:
      [ivy:buildnumber] java.io.IOException The HTTP response code for http://localhost:8081/nexus/content/repositories/snapshots/hr/B22SeedBusinessServiceJava/ did not indicate a success. See log for more detail.
      Overriding previous definition of property "ivy.revision"
      Setting project property: ivy.revision -> 1.0.0
      Setting project property: ivy.new.revision -> 1.0.1
      Setting project property: ivy.build.number -> 0
      Setting project property: ivy.new.build.number -> 1
      [echo] 1.0.0 - 1.0.1
      BUILD SUCCESSFUL
      [/CODE]

        Activity

        Hide
        Maarten Coene added a comment -

        I saw on the mailinglist that in the pattern of your nexus resolver you use the [organization] token.
        Could you try to replace [organization] with [organisation] in your patterns and tell us if Ivy behaves differently now?

        Show
        Maarten Coene added a comment - I saw on the mailinglist that in the pattern of your nexus resolver you use the [organization] token. Could you try to replace [organization] with [organisation] in your patterns and tell us if Ivy behaves differently now?
        Hide
        Maarten Coene added a comment -

        I could reproduce it with using [organization] in the patterns and fixed the problem in SVN trunk.
        If this didn't fix your problem, please reopen the issue.

        Maarten

        Show
        Maarten Coene added a comment - I could reproduce it with using [organization] in the patterns and fixed the problem in SVN trunk. If this didn't fix your problem, please reopen the issue. Maarten

          People

          • Assignee:
            Maarten Coene
            Reporter:
            Mihael Sedmak
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development