You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Nicolas Lalevée (JIRA)" <ji...@apache.org> on 2017/05/16 21:15:04 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=16013124#comment-16013124 ] 

Nicolas Lalevée commented on IVY-1478:
--------------------------------------

Sorry for the late response.

I tried with a fresh build I got this error when running "ant generate-retrieved-target-platform":
{noformat}
[ivy:resolve] [xml parsing: ivy-fixed.xml:24:176: cvc-complex-type.3.2.2 : L'attribut 'osgi_bundle' n'est pas autorisé dans l'élément 'dependency'. in file:/Users/nlalevee/dev/ivy/git/ivy/tmp/ivy-fixed.xml
{noformat}
So we may have to fix that too.

Then I got rid of that xml attribute and I could indeed reproduce this issue, some files end with a dot, not with .jar.
And I think you are right, setting the extension to EMPTY is wrong. And I agree too that letting it to NULL is highly risky. There should be a proper extension, extension which should be based on what is computed by org.apache.ivy.core.pack.PackagingManager. Somehow the retrieve engine should be aware of that "unpacked" extension.


> 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.15#6346)