files[i].getName().endsWith(".zip")) { logger.debug("Add jar file {}", files[i].getName()); builder.addClasspath(files[i]);
error("Unknown option for dot: %s", args[i]); else b.addClasspath(getFile(args[i]));
public Builder getSubBuilder() throws Exception { Builder builder = new Builder(this); builder.setBase(getBase()); for (Jar file : getClasspath()) { builder.addClasspath(file); } return builder; }
for ( Pom dep : dependencies ) { System.out.printf( "%20s %-20s %10s\n", dep.getGroupId(), dep.getArtifactId(), dep.getVersion()); a.addClasspath(dep.getArtifact());
public Builder getSubBuilder() throws Exception { Builder builder = new Builder(this); builder.setBase(getBase()); for (Jar file : getClasspath()) { builder.addClasspath(file); } return builder; }
public Jar getValidJar(Jar jar, String id) throws Exception { Manifest manifest = jar.getManifest(); if (manifest == null) { trace("Wrapping with all defaults"); Builder b = new Builder(this); b.addClasspath(jar); b.setProperty("Bnd-Message", "Wrapped from " + id + "because lacked manifest"); b.setProperty(Constants.EXPORT_PACKAGE, "*"); b.setProperty(Constants.IMPORT_PACKAGE, "*;resolution:=optional"); jar = b.build(); } else if (manifest.getMainAttributes().getValue(Constants.BUNDLE_MANIFESTVERSION) == null) { trace("Not a release 4 bundle, wrapping with manifest as source"); Builder b = new Builder(this); b.addClasspath(jar); b.setProperty(Constants.PRIVATE_PACKAGE, "*"); b.mergeManifest(manifest); String imprts = manifest.getMainAttributes().getValue(Constants.IMPORT_PACKAGE); if (imprts == null) imprts = ""; else imprts += ","; imprts += "*;resolution=optional"; b.setProperty(Constants.IMPORT_PACKAGE, imprts); b.setProperty("Bnd-Message", "Wrapped from " + id + "because had incomplete manifest"); jar = b.build(); } return jar; }
trace("Wrapping with all defaults"); Builder b = new Builder(this); b.addClasspath(jar); b.setProperty("Bnd-Message", "Wrapped from " + f.getAbsolutePath() + "because lacked manifest"); trace("Not a release 4 bundle, wrapping with manifest as source"); Builder b = new Builder(this); b.addClasspath(jar); b.setProperty(Constants.PRIVATE_PACKAGE, "*"); b.mergeManifest(manifest);
builder.setProperty(Builder.BUNDLE_SYMBOLICNAME, CONFIG_PACKAGE+config.getName().toLowerCase()); try { builder.addClasspath(new File(config.getDestinationFolder(),CONFIG_ROOT)); } catch (IOException e) { log.warn("(builder.addClasspath) Unable to build OSGI Bundle for Indexed Referenced Site "+config.getName(),e);
builder.setProperty(Builder.BUNDLE_SYMBOLICNAME, CONFIG_PACKAGE+config.getName().toLowerCase()); try { builder.addClasspath(new File(config.getDestinationFolder(),CONFIG_ROOT)); } catch (IOException e) { log.warn("(builder.addClasspath) Unable to build OSGI Bundle for Indexed Referenced Site "+config.getName(),e);