[ 
https://issues.apache.org/jira/browse/IVY-1478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nicolas Lalevée resolved IVY-1478.
----------------------------------
       Resolution: Fixed
         Assignee: Nicolas Lalevée
    Fix Version/s: master

thanks Jaikiran, merged.

> 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
>            Assignee: Nicolas Lalevée
>            Priority: Blocker
>              Labels: extensions, resolver, retrieve, updateresolver
>             Fix For: master
>
>
> 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.15#6346)

Reply via email to