Adapt to changes in BND.
authorMathieu Baudier <mbaudier@argeo.org>
Fri, 4 Oct 2019 08:55:36 +0000 (10:55 +0200)
committerMathieu Baudier <mbaudier@argeo.org>
Fri, 4 Oct 2019 08:55:36 +0000 (10:55 +0200)
org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/BndProcess.java
org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/ArchiveWrapper.java
org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/BndWrapper.java
org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/UriWrapper.java

index 6448ae5abd835e79412a34b7baf14b4e6354dc3b..99936dcb31e2b8e9ddcaa6623e1d071a11fb3bd6 100644 (file)
@@ -23,9 +23,9 @@ import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
 
-import aQute.lib.osgi.Builder;
-import aQute.lib.osgi.Constants;
-import aQute.lib.osgi.Jar;
+import aQute.bnd.osgi.Builder;
+import aQute.bnd.osgi.Constants;
+import aQute.bnd.osgi.Jar;
 
 public class BndProcess extends AbstractHandler implements Constants {
 
index f5ba43682fa664ef0234a960a46d8b08fb549528..d53078ec5622ce8d4799e1cbea74e4a73c777844 100644 (file)
@@ -40,7 +40,7 @@ import org.eclipse.aether.artifact.DefaultArtifact;
 import org.springframework.util.AntPathMatcher;
 import org.springframework.util.PathMatcher;
 
-import aQute.lib.osgi.Jar;
+import aQute.bnd.osgi.Jar;
 
 /**
  * Download a software distribution and generates the related OSGi bundles from
index 17bdbe11772ab1a71a40d82d8e533b3a36175bee..3d83c07e7ea736e099b2736b3029e265110559ab 100644 (file)
@@ -18,9 +18,9 @@ import org.eclipse.aether.artifact.DefaultArtifact;
 import org.osgi.framework.Version;
 import org.springframework.beans.factory.BeanNameAware;
 
-import aQute.lib.osgi.Builder;
-import aQute.lib.osgi.Constants;
-import aQute.lib.osgi.Jar;
+import aQute.bnd.osgi.Builder;
+import aQute.bnd.osgi.Constants;
+import aQute.bnd.osgi.Jar;
 
 /** Utilities around the BND library, which manipulates OSGi metadata. */
 public class BndWrapper implements Constants, CategorizedNameVersion,
@@ -124,9 +124,13 @@ public class BndWrapper implements Constants, CategorizedNameVersion,
                } catch (Exception e) {
                        throw new SlcException("Cannot wrap jar", e);
                } finally {
-                       b.close();
-                       if (jar != null)
-                               jar.close();
+                       try {
+                               b.close();
+                               if (jar != null)
+                                       jar.close();
+                       } catch (Exception e) {
+                               // silent
+                       }
                }
 
        }
index 819b623865546d370167a1eb0eeb75680687f7e3..665bfce516a0edfcd0856342af44077d0b604322 100644 (file)
@@ -21,7 +21,7 @@ import org.argeo.slc.repo.RepoUtils;
 import org.eclipse.aether.artifact.Artifact;
 import org.eclipse.aether.artifact.DefaultArtifact;
 
-import aQute.lib.osgi.Jar;
+import aQute.bnd.osgi.Jar;
 
 public class UriWrapper extends BndWrapper implements Runnable {
        private final static Log log = LogFactory.getLog(UriWrapper.class);