本文整理了Java中aQute.bnd.osgi.Builder.setProperty()
方法的一些代码示例,展示了Builder.setProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Builder.setProperty()
方法的具体详情如下:
包路径:aQute.bnd.osgi.Builder
类名称:Builder
方法名:setProperty
暂无
代码示例来源: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/biz.aQute.bnd
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()
this.addClose(b);
b.addClasspath(jar);
b.setProperty(Constants.PRIVATE_PACKAGE, "*");
b.mergeManifest(manifest);
String imprts = manifest.getMainAttributes()
imprts += "*;resolution=optional";
b.setProperty(Constants.IMPORT_PACKAGE, imprts);
b.setProperty("Bnd-Message", "Wrapped from " + id + "because had incomplete manifest");
jar = b.build();
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
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()
this.addClose(b);
b.addClasspath(jar);
b.setProperty(Constants.PRIVATE_PACKAGE, "*");
b.mergeManifest(manifest);
String imprts = manifest.getMainAttributes()
imprts += "*;resolution=optional";
b.setProperty(Constants.IMPORT_PACKAGE, imprts);
b.setProperty("Bnd-Message", "Wrapped from " + id + "because had incomplete manifest");
jar = b.build();
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
private void copy(Jar jar, String path, Resource resource, Map<String, String> extra) {
jar.putResource(path, resource);
if (isTrue(extra.get(LIB_DIRECTIVE))) {
setProperty(BUNDLE_CLASSPATH, append(getProperty(BUNDLE_CLASSPATH, "."), path));
}
}
代码示例来源: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: 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: biz.aQute.bnd/biz.aQute.bnd
private void copy(Jar jar, String path, Resource resource, Map<String, String> extra) {
jar.putResource(path, resource);
if (isTrue(extra.get(LIB_DIRECTIVE))) {
setProperty(BUNDLE_CLASSPATH, append(getProperty(BUNDLE_CLASSPATH, "."), path));
}
}
代码示例来源:origin: biz.aQute/bndlib
private void copy(Jar jar, String path, File from, boolean preprocess, Map<String,String> extra) throws Exception {
if (doNotCopy(from.getName()))
return;
if (from.isDirectory()) {
File files[] = from.listFiles();
for (int i = 0; i < files.length; i++) {
copy(jar, appendPath(path, files[i].getName()), files[i], preprocess, extra);
}
} else {
if (from.exists()) {
Resource resource = new FileResource(from);
if (preprocess) {
resource = new PreprocessResource(this, resource);
}
String x = extra.get("extra");
if (x != null)
resource.setExtra(x);
if (path.endsWith("/"))
path = path + from.getName();
jar.putResource(path, resource);
if (isTrue(extra.get(LIB_DIRECTIVE))) {
setProperty(BUNDLE_CLASSPATH, append(getProperty(BUNDLE_CLASSPATH), path));
}
} else if (from.getName().equals(Constants.EMPTY_HEADER)) {
jar.putResource(path, new EmbeddedResource(new byte[0], 0));
} else {
error("Input file does not exist: " + from);
}
}
}
代码示例来源:origin: biz.aQute.bnd/bndlib
setProperty(BUNDLE_CLASSPATH, append(getProperty(BUNDLE_CLASSPATH), path));
代码示例来源:origin: biz.aQute/bndlib
String path = "WEB-INF/lib/" + f.getName();
dot.putResource(path, new JarResource(jar));
setProperty(BUNDLE_CLASSPATH, append(getProperty(BUNDLE_CLASSPATH), path));
代码示例来源:origin: biz.aQute.bnd/bndlib
bchild.setProperty(Analyzer.INCLUDE_RESOURCE, "");
bchild.setProperty(Analyzer.INCLUDERESOURCE, "");
bchild.setProperties(bndfile, builder.getBase());
代码示例来源:origin: biz.aQute.bnd/bndlib
String path = "WEB-INF/lib/" + f.getName();
dot.putResource(path, new JarResource(jar));
setProperty(BUNDLE_CLASSPATH, append(getProperty(BUNDLE_CLASSPATH), path));
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
bchild.setProperty(Constants.INCLUDE_RESOURCE, "");
bchild.setProperty(Constants.INCLUDERESOURCE, "");
bchild.setProperties(bndfile, builder.getBase());
代码示例来源:origin: biz.aQute.bnd/bnd
bchild.setProperty(Analyzer.INCLUDE_RESOURCE, "");
bchild.setProperty(Analyzer.INCLUDERESOURCE, "");
bchild.setProperties(bndfile, builder.getBase());
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
bchild.setProperty(Constants.INCLUDE_RESOURCE, "");
bchild.setProperty(Constants.INCLUDERESOURCE, "");
bchild.setProperties(bndfile, builder.getBase());
代码示例来源:origin: biz.aQute/bndlib
/**
* Intercept the call to analyze and cleanup versions after we have analyzed
* the setup. We do not want to cleanup if we are going to verify.
*/
@Override
public void analyze() throws Exception {
super.analyze();
cleanupVersion(getImports(), null);
cleanupVersion(getExports(), getVersion());
String version = getProperty(BUNDLE_VERSION);
if (version != null) {
version = cleanupVersion(version);
if (version.endsWith(".SNAPSHOT")) {
version = version.replaceAll("SNAPSHOT$", getProperty(SNAPSHOT, "SNAPSHOT"));
}
setProperty(BUNDLE_VERSION, version);
}
}
代码示例来源:origin: biz.aQute.bnd/bndlib
/**
* Intercept the call to analyze and cleanup versions after we have analyzed
* the setup. We do not want to cleanup if we are going to verify.
*/
@Override
public void analyze() throws Exception {
super.analyze();
cleanupVersion(getImports(), null);
cleanupVersion(getExports(), getVersion());
String version = getProperty(BUNDLE_VERSION);
if (version != null) {
version = cleanupVersion(version);
if (version.endsWith(".SNAPSHOT")) {
version = version.replaceAll("SNAPSHOT$", getProperty(SNAPSHOT, "SNAPSHOT"));
}
setProperty(BUNDLE_VERSION, version);
}
}
代码示例来源:origin: biz.aQute.bnd/bnd
/**
* Intercept the call to analyze and cleanup versions after we have analyzed
* the setup. We do not want to cleanup if we are going to verify.
*/
@Override
public void analyze() throws Exception {
super.analyze();
cleanupVersion(getImports(), null);
cleanupVersion(getExports(), getVersion());
String version = getProperty(BUNDLE_VERSION);
if (version != null) {
version = cleanupVersion(version);
if (version.endsWith(".SNAPSHOT")) {
version = version.replaceAll("SNAPSHOT$", getProperty(SNAPSHOT, "SNAPSHOT"));
}
setProperty(BUNDLE_VERSION, version);
}
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
/**
* Intercept the call to analyze and cleanup versions after we have analyzed
* the setup. We do not want to cleanup if we are going to verify.
*/
@Override
public void analyze() throws Exception {
super.analyze();
cleanupVersion(getImports(), null);
cleanupVersion(getExports(), getVersion());
String version = getProperty(BUNDLE_VERSION);
if (version != null) {
version = cleanupVersion(version);
version = doSnapshot(version);
setProperty(BUNDLE_VERSION, version);
}
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
/**
* Intercept the call to analyze and cleanup versions after we have analyzed
* the setup. We do not want to cleanup if we are going to verify.
*/
@Override
public void analyze() throws Exception {
super.analyze();
cleanupVersion(getImports(), null);
cleanupVersion(getExports(), getVersion());
String version = getProperty(BUNDLE_VERSION);
if (version != null) {
version = cleanupVersion(version);
version = doSnapshot(version);
setProperty(BUNDLE_VERSION, version);
}
}
内容来源于网络,如有侵权,请联系作者删除!