bndtools/bnd — pull request #576 by gamerson (2014-07-31 15:20:38+00:00)
Title: More aether plugin fixes

Recently I've been working with some bundles and I'm trying to use existing Nexus repositories as remote repositories using the AetherRepository plugin. I've run into a couple of small issues described below:

1. Sometimes artifact versions in a maven nexus repository will have truncated versions like "2.5" or "3.0", but once these versions are read from the .bnd file they will be converted to their proper OSGi equivalent like 2.5.0 and 3.0.0. But when these bundles are fetched from remote, the "version" string that is used is the full osgi version, not the original truncated string. So instead of using javax.servlet:servlet-api:2.5 (which exists on maven central), it will use javax.servlet:servlet-api:2.5.0 (which doesn't exist).

My proposed solution is to allow aether repository to use the "strategy=exact" attribute to mean that instead of the OsgiVersion equivalent version, it would use the exact version string specified in the -buildpath. See c39cb5acdacb861b48fbfa547361d3fde768099d

2. When a remote bundle download is attempted and if there is a resolution exception (artifact not found, etc) the aether repository get() is throwing an uncaught exception and is causing all further attempts for resolution.

My proposed solution is to just wrap the artifact download with a try/catch and return a null file is the download failed. See 7d625c6b9b4f457c5b4dbcd07bedc6e9fa009245

Regarding issue 1 there may be an existing way to handle this or a better way, or overriding the strategy in this manner may be inappropriate.