ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Bernhagen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IVY-1493) Can't resolve wildcard dependencies when remote artifact server does not set content-type header.
Date Tue, 14 Oct 2014 20:57:33 GMT

    [ https://issues.apache.org/jira/browse/IVY-1493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14171507#comment-14171507
] 

Andrew Bernhagen commented on IVY-1493:
---------------------------------------

I found a similar problem with ivy:checkdepsupdate task that breaks that task.  Here is the
ant stack trace:
[ivy:checkdepsupdate] java.lang.NullPointerException: charsetName
[ivy:checkdepsupdate] 	at java.io.InputStreamReader.<init>(InputStreamReader.java:82)
[ivy:checkdepsupdate] 	at org.apache.ivy.util.url.ApacheURLLister.retrieveListing(ApacheURLLister.java:113)
[ivy:checkdepsupdate] 	at org.apache.ivy.util.url.ApacheURLLister.listAll(ApacheURLLister.java:57)
[ivy:checkdepsupdate] 	at org.apache.ivy.plugins.repository.url.URLRepository.list(URLRepository.java:100)
[ivy:checkdepsupdate] 	at org.apache.ivy.plugins.resolver.util.ResolverHelper.listAll(ResolverHelper.java:105)
[ivy:checkdepsupdate] 	at org.apache.ivy.plugins.resolver.util.ResolverHelper.listTokenValues(ResolverHelper.java:57)
[ivy:checkdepsupdate] 	at org.apache.ivy.plugins.resolver.util.ResolverHelper.findAll(ResolverHelper.java:140)
[ivy:checkdepsupdate] 	at org.apache.ivy.plugins.resolver.RepositoryResolver.listResources(RepositoryResolver.java:184)
[ivy:checkdepsupdate] 	at org.apache.ivy.plugins.resolver.IBiblioResolver.listResources(IBiblioResolver.java:428)
[ivy:checkdepsupdate] 	at org.apache.ivy.plugins.resolver.RepositoryResolver.findDynamicResourceUsingPattern(RepositoryResolver.java:148)
[ivy:checkdepsupdate] 	at org.apache.ivy.plugins.resolver.RepositoryResolver.findResourceUsingPattern(RepositoryResolver.java:130)
[ivy:checkdepsupdate] 	at org.apache.ivy.plugins.resolver.AbstractPatternsBasedResolver.findResourceUsingPatterns(AbstractPatternsBasedResolver.java:97)
[ivy:checkdepsupdate] 	at org.apache.ivy.plugins.resolver.IBiblioResolver.findArtifactRef(IBiblioResolver.java:125)
[ivy:checkdepsupdate] 	at org.apache.ivy.plugins.resolver.BasicResolver.getArtifactRef(BasicResolver.java:1034)
[ivy:checkdepsupdate] 	at org.apache.ivy.plugins.resolver.BasicResolver.findFirstArtifactRef(BasicResolver.java:971)
[ivy:checkdepsupdate] 	at org.apache.ivy.plugins.resolver.BasicResolver.getDependency(BasicResolver.java:243)
[ivy:checkdepsupdate] 	at org.apache.ivy.plugins.resolver.IBiblioResolver.getDependency(IBiblioResolver.java:506)
[ivy:checkdepsupdate] 	at org.apache.ivy.plugins.resolver.ChainResolver.getDependency(ChainResolver.java:104)
[ivy:checkdepsupdate] 	at org.apache.ivy.core.resolve.IvyNode.loadData(IvyNode.java:170)
[ivy:checkdepsupdate] 	at org.apache.ivy.core.resolve.VisitNode.loadData(VisitNode.java:292)
[ivy:checkdepsupdate] 	at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:718)
[ivy:checkdepsupdate] 	at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:803)
[ivy:checkdepsupdate] 	at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:726)
[ivy:checkdepsupdate] 	at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:791)
[ivy:checkdepsupdate] 	at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:726)
[ivy:checkdepsupdate] 	at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:791)
[ivy:checkdepsupdate] 	at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:726)
[ivy:checkdepsupdate] 	at org.apache.ivy.core.resolve.ResolveEngine.getDependencies(ResolveEngine.java:599)
[ivy:checkdepsupdate] 	at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:236)
[ivy:checkdepsupdate] 	at org.apache.ivy.ant.IvyDependencyUpdateChecker.doExecute(IvyDependencyUpdateChecker.java:76)
[ivy:checkdepsupdate] 	at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:271)
[ivy:checkdepsupdate] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
[ivy:checkdepsupdate] 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
[ivy:checkdepsupdate] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ivy:checkdepsupdate] 	at java.lang.reflect.Method.invoke(Method.java:597)
[ivy:checkdepsupdate] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[ivy:checkdepsupdate] 	at org.apache.tools.ant.Task.perform(Task.java:348)
[ivy:checkdepsupdate] 	at org.apache.tools.ant.Target.execute(Target.java:435)
[ivy:checkdepsupdate] 	at org.apache.tools.ant.Target.performTasks(Target.java:456)
[ivy:checkdepsupdate] 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
[ivy:checkdepsupdate] 	at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
[ivy:checkdepsupdate] 	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[ivy:checkdepsupdate] 	at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:36)
[ivy:checkdepsupdate] 	at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
[ivy:checkdepsupdate] 	at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:452)
[ivy:checkdepsupdate] 	at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:139)
[ivy:checkdepsupdate] 	prod-virtual: unable to list resources for com/sentry/smarts#smarts;latest.integration:
pattern=http://localhost:8100/artifactory/prod-virtual/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]

> 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
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> 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)

Mime
View raw message