You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Andrew Bernhagen (JIRA)" <ji...@apache.org> on 2014/10/10 00:08:34 UTC
[jira] [Created] (IVY-1493) Can't resolve wildcard dependencies
when remote artifact server does not set content-type header.
Andrew Bernhagen created IVY-1493:
-------------------------------------
Summary: Can't resolve wildcard dependencies when remote artifact server does not set content-type header.
Key: IVY-1493
URL: https://issues.apache.org/jira/browse/IVY-1493
Project: Ivy
Issue Type: Bug
Components: Core
Affects Versions: 2.4.0-RC1, trunk
Environment: JDK6, Artifactory 3.4.0
Reporter: Andrew Bernhagen
Priority: Minor
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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)