本文整理了Java中aQute.bnd.osgi.Builder.<init>()
方法的一些代码示例,展示了Builder.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Builder.<init>()
方法的具体详情如下:
包路径:aQute.bnd.osgi.Builder
类名称:Builder
方法名:<init>
暂无
代码示例来源:origin: biz.aQute.bnd/bnd
private void prebuild(List<String> set, List<String> order, List<Builder> builders, String s) throws IOException {
if (order.contains(s)) // Already done
return;
if (set.contains(s))
error("Cyclic -prebuild dependency %s from %s", s, set);
Builder b = new Builder(this);
b.setProperties(getFile(s));
String prebuild = b.get("prebuild");
if (prebuild != null) {
set.add(s);
try {
Collection<String> parts = split(prebuild);
for (String p : parts) {
prebuild(set, order, builders, p);
}
}
finally {
set.remove(s);
}
}
order.add(s);
builders.add(b);
}
代码示例来源:origin: biz.aQute.bnd/bndlib
public Builder getSubBuilder() throws Exception {
Builder builder = new Builder(this);
builder.setBase(getBase());
for (Jar file : getClasspath()) {
builder.addClasspath(file);
}
return builder;
}
代码示例来源:origin: biz.aQute/bndlib
public Builder getSubBuilder() throws Exception {
Builder builder = new Builder(this);
builder.setBase(getBase());
for (Jar file : getClasspath()) {
builder.addClasspath(file);
}
return builder;
}
代码示例来源:origin: biz.aQute.bnd/bnd
public Builder getSubBuilder() throws Exception {
Builder builder = new Builder(this);
builder.setBase(getBase());
for (Jar file : getClasspath()) {
builder.addClasspath(file);
}
return builder;
}
代码示例来源:origin: biz.aQute/bndlib
CachedPom pom = maven.getPom(group, artifact, version, urls2);
Builder a = new Builder();
a.setProperty("Private-Package", "*");
Set<Pom> dependencies = pom.getDependencies(Scope.compile, urls2);
代码示例来源:origin: biz.aQute.bnd/bndlib
CachedPom pom = maven.getPom(group, artifact, version, urls2);
Builder a = new Builder();
a.setProperty(Constants.PRIVATEPACKAGE, "*");
Set<Pom> dependencies = pom.getDependencies(Scope.compile, urls2);
代码示例来源:origin: biz.aQute.bnd/bnd
CachedPom pom = maven.getPom(group, artifact, version, urls2);
Builder a = new Builder();
a.setProperty(Constants.PRIVATEPACKAGE, "*");
Set<Pom> dependencies = pom.getDependencies(Scope.compile, urls2);
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
CachedPom pom = maven.getPom(group, artifact, version, urls2);
try (Builder a = new Builder()) {
a.setProperty(Constants.PRIVATEPACKAGE, "*");
Set<Pom> dependencies = pom.getDependencies(Scope.compile, urls2);
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
public Builder getSubBuilder() throws Exception {
Builder builder = new Builder(this);
builder.setBase(getBase());
builder.use(this);
for (Jar file : getClasspath()) {
builder.addClasspath(file);
}
return builder;
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
public Builder getSubBuilder() throws Exception {
Builder builder = new Builder(this);
builder.setBase(getBase());
builder.use(this);
for (Jar file : getClasspath()) {
builder.addClasspath(file);
}
return builder;
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
CachedPom pom = maven.getPom(group, artifact, version, urls2);
try (Builder a = new Builder()) {
a.setProperty(Constants.PRIVATEPACKAGE, "*");
Set<Pom> dependencies = pom.getDependencies(Scope.compile, urls2);
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
if (manifest == null) {
logger.debug("Wrapping with all defaults");
Builder b = new Builder(this);
this.addClose(b);
b.addClasspath(jar);
.getValue(Constants.BUNDLE_MANIFESTVERSION) == null) {
logger.debug("Not a release 4 bundle, wrapping with manifest as source");
Builder b = new Builder(this);
this.addClose(b);
b.addClasspath(jar);
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
if (manifest == null) {
logger.debug("Wrapping with all defaults");
Builder b = new Builder(this);
this.addClose(b);
b.addClasspath(jar);
.getValue(Constants.BUNDLE_MANIFESTVERSION) == null) {
logger.debug("Not a release 4 bundle, wrapping with manifest as source");
Builder b = new Builder(this);
this.addClose(b);
b.addClasspath(jar);
代码示例来源:origin: biz.aQute/bndlib
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;
}
代码示例来源:origin: biz.aQute.bnd/bndlib
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);
this.addClose(b);
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);
this.addClose(b);
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;
}
代码示例来源:origin: org.wisdom-framework/wisdom-maven-plugin
private static Builder getOSGiBuilder(File basedir, Properties properties,
Jar[] classpath) {
Builder builder = new Builder();
synchronized (BundlePackager.class) {
builder.setBase(basedir);
}
// Add the range fixer plugin
final ImportedPackageRangeFixer plugin = new ImportedPackageRangeFixer();
plugin.setReporter(builder);
plugin.setProperties(Collections.<String, String>emptyMap());
builder.addBasicPlugin(plugin);
builder.setProperties(Instructions.sanitize(properties));
if (classpath != null) {
builder.setClasspath(classpath);
}
return builder;
}
代码示例来源:origin: biz.aQute.bnd/bnd
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);
this.addClose(b);
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);
this.addClose(b);
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;
}
代码示例来源:origin: diffplug/goomph
try (Builder builder = new Builder()) {
代码示例来源:origin: org.ops4j.pax.tinybundles/tinybundles
properties.putAll( instructions );
final Builder analyzer = new Builder();
analyzer.setJar( jar );
analyzer.setProperties( properties );
代码示例来源:origin: biz.aQute.bnd/bnd
public void build(String dest, boolean force, String path) throws IOException, Exception {
Builder b = new Builder();
try {
File f = getFile(path);
if (!f.isFile()) {
error("No such file %s", f);
return;
}
b.setTrace(isTrace());
b.setPedantic(isPedantic());
b.setProperties(f);
List<Builder> subs = b.getSubBuilders();
for (Builder bb : subs) {
trace("building %s", bb.getPropertiesFile());
bb.build();
File out = bb.getOutputFile(dest);
getInfo(bb, bb.getBsn() + ": ");
if (isOk()) {
bb.save(out, force);
}
getInfo(bb, bb.getBsn() + ": "); // pickup any save errors
if (!isOk()) {
out.delete();
}
}
}
finally {
b.close();
}
}
内容来源于网络,如有侵权,请联系作者删除!