Uploaded image for project: 'Ivy'
  1. Ivy
  2. IVY-1493

Can't resolve wildcard dependencies when remote artifact server does not set content-type header.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.4.0-RC1, 2.5.0-rc1
    • 2.4.0
    • Core
    • None
    • JDK6, Artifactory 3.4.0

    Description

      Let's say I define an ivy dependency like this:

      <dependency org="org.hibernate" name="hibernate-core" rev="4.+" conf="compile->default" />

      I know this is a valid dependency for my artifact repository (tested against Artifactory 3.4.0) as it is:
      1. Valid if I specify the revision as 4.3.6.Final.
      2. Valid if I pull 4.+ from Maven central directly.

      The reason it fails when pulling 4.+ from my private artifact repository is because Artifactory does not set the Content-Type header on certain requests. I believe this problem to be related to IVY-1400.

      I was able to code a workaround as a test to see if it fixed my problem by editing org.apache.ivy.util.url.ApacheURLLister (1557968) line 113 to become:

      BufferedReader r = null;
      if (charset == null)

      { r = new BufferedReader(new InputStreamReader(contentStream)); }

      else

      { r = new BufferedReader(new InputStreamReader(contentStream, charset)); }

      This resolved the issue in my test case.

      Attachments

        Issue Links

          Activity

            People

              hibou Nicolas Lalevée
              albernhagen Andrew Bernhagen
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 4h
                  4h
                  Remaining:
                  Remaining Estimate - 4h
                  4h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified