You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Alexander Ziller (JIRA)" <ji...@apache.org> on 2016/08/08 09:17:20 UTC

[jira] [Commented] (IVY-1478) Missing extension in RETRIEVE task in combination with updatesite resolver

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

Alexander Ziller commented on IVY-1478:
---------------------------------------

Could somebody confirm/deny this issue? I am still having this problem with the 2.4.0 release version..

> Missing extension in RETRIEVE task in combination with updatesite resolver
> --------------------------------------------------------------------------
>
>                 Key: IVY-1478
>                 URL: https://issues.apache.org/jira/browse/IVY-1478
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.4.0-RC1
>         Environment: Windows 7, 64bit
>            Reporter: Alexander Ziller
>            Priority: Blocker
>              Labels: extensions, resolver, retrieve, updateresolver
>
> Using the updatesite resolver and the retrieve ant task, I do not get the correct filenames in the retrieve destination. The retrieve task cuts away the extension (.jar) of the bundles that I fetched.
> *Steps to reproduce:*
> * Download demo files from https://ant.apache.org/ivy/history/latest-milestone/osgi/target-platform.html
> * add the following dependencies:
> {quote}
>       <dependency org="bundle" name="org.eclipse.osgi" rev="3.8.2.v20130124-134944"/>
>       <dependency org="bundle" name="org.eclipse.equinox.ds" rev="1.4.1.v20120926-201320"/>
> {quote}
> * run "ant update-dependencies"
> * run "ant generate-retrieved-target-platform"
> *Reason of bug:*
> _org.apache.ivy.core.retrieve.RetrieveEngine:342_ 
> checks against ArtifactDownloadReport.getUnpackedLocalFile() and if present, sets a String representing the extension to EMPTY instead of NULL.
> _org.apache.ivy.core.IvyPatternHelper:162_ 
> uses the extension unless set to NULL, in which case "jar" would be correctly used.
> Settings the extension string to EMPTY when ArtifactDownloadReport.getUnpackedLocalFile() returns NOT NULL is IMO wrong when there is only 1 decision for the final extension based on whether the extension string has a value or is NULL, in which case the extension is "jar"
> *Possible solution:*
> In _org.apache.ivy.core.IvyPatternHelper_:
> When ArtifactDownloadReport.getUnpackedLocalFile() returns NOT NULL, try to retrieve the extension from the File object OR set the extension to NULL, expecting "jar" as extension (highly risky)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)