private BundleHandle installBundle(String groupId, String artifactId, String version, boolean startBundle) throws BundleException, IOException {
String filespec = groupId + ":" + artifactId + ":jar:" + version;
File[] resolved = Maven.resolver().resolve(filespec).withoutTransitivity().asFile();
if (resolved == null || resolved.length == 0)
throw new BundleException("Cannot obtain maven artifact: " + filespec);
if (resolved.length > 1)
throw new BundleException("Multiple maven artifacts for: " + filespec);
URL fileURL = resolved[0].toURI().toURL();
BundleHandle handle = installBundle(filespec, fileURL);
if (startBundle) {
frameworkMBean.startBundle(handle.getBundleId());