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:
<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"/>
- run "ant update-dependencies"
- run "ant generate-retrieved-target-platform"
Reason of bug:
checks against ArtifactDownloadReport.getUnpackedLocalFile() and if present, sets a String representing the extension to EMPTY instead of NULL.
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"
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)