本文整理了Java中aQute.bnd.osgi.Builder.error()
方法的一些代码示例,展示了Builder.error()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Builder.error()
方法的具体详情如下:
包路径:aQute.bnd.osgi.Builder
类名称:Builder
方法名:error
暂无
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
/**
* A macro to convert a maven version to an OSGi version
*/
public String _maven_version(String args[]) {
if (args.length > 2)
error("${maven_version} macro receives too many arguments %s", Arrays.toString(args));
else if (args.length < 2)
error("${maven_version} macro has no arguments, use ${maven_version;1.2.3-SNAPSHOT}");
else {
return cleanupVersion(args[1]);
}
return null;
}
代码示例来源:origin: biz.aQute/bndlib
/**
* A macro to convert a maven version to an OSGi version
*/
public String _maven_version(String args[]) {
if (args.length > 2)
error("${maven_version} macro receives too many arguments " + Arrays.toString(args));
else if (args.length < 2)
error("${maven_version} macro has no arguments, use ${maven_version;1.2.3-SNAPSHOT}");
else {
return cleanupVersion(args[1]);
}
return null;
}
代码示例来源:origin: biz.aQute.bnd/bndlib
/**
* A macro to convert a maven version to an OSGi version
*/
public String _maven_version(String args[]) {
if (args.length > 2)
error("${maven_version} macro receives too many arguments " + Arrays.toString(args));
else if (args.length < 2)
error("${maven_version} macro has no arguments, use ${maven_version;1.2.3-SNAPSHOT}");
else {
return cleanupVersion(args[1]);
}
return null;
}
代码示例来源:origin: biz.aQute.bnd/bnd
/**
* A macro to convert a maven version to an OSGi version
*/
public String _maven_version(String args[]) {
if (args.length > 2)
error("${maven_version} macro receives too many arguments " + Arrays.toString(args));
else if (args.length < 2)
error("${maven_version} macro has no arguments, use ${maven_version;1.2.3-SNAPSHOT}");
else {
return cleanupVersion(args[1]);
}
return null;
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
private int getSplitStrategy(String type) {
if (type == null)
return SPLIT_DEFAULT;
if (type.equals("merge-last"))
return SPLIT_MERGE_LAST;
if (type.equals("merge-first"))
return SPLIT_MERGE_FIRST;
if (type.equals("error"))
return SPLIT_ERROR;
if (type.equals("first"))
return SPLIT_FIRST;
error("Invalid strategy for split-package: %s", type);
return SPLIT_DEFAULT;
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
/**
* A macro to convert a maven version to an OSGi version
*/
public String _maven_version(String args[]) {
if (args.length > 2)
error("${maven_version} macro receives too many arguments %s", Arrays.toString(args));
else if (args.length < 2)
error("${maven_version} macro has no arguments, use ${maven_version;1.2.3-SNAPSHOT}");
else {
return cleanupVersion(args[1]);
}
return null;
}
代码示例来源:origin: biz.aQute/bndlib
private int getSplitStrategy(String type) {
if (type == null)
return SPLIT_DEFAULT;
if (type.equals("merge-last"))
return SPLIT_MERGE_LAST;
if (type.equals("merge-first"))
return SPLIT_MERGE_FIRST;
if (type.equals("error"))
return SPLIT_ERROR;
if (type.equals("first"))
return SPLIT_FIRST;
error("Invalid strategy for split-package: " + type);
return SPLIT_DEFAULT;
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
private int getSplitStrategy(String type) {
if (type == null)
return SPLIT_DEFAULT;
if (type.equals("merge-last"))
return SPLIT_MERGE_LAST;
if (type.equals("merge-first"))
return SPLIT_MERGE_FIRST;
if (type.equals("error"))
return SPLIT_ERROR;
if (type.equals("first"))
return SPLIT_FIRST;
error("Invalid strategy for split-package: %s", type);
return SPLIT_DEFAULT;
}
代码示例来源:origin: biz.aQute.bnd/bndlib
private int getSplitStrategy(String type) {
if (type == null)
return SPLIT_DEFAULT;
if (type.equals("merge-last"))
return SPLIT_MERGE_LAST;
if (type.equals("merge-first"))
return SPLIT_MERGE_FIRST;
if (type.equals("error"))
return SPLIT_ERROR;
if (type.equals("first"))
return SPLIT_FIRST;
error("Invalid strategy for split-package: " + type);
return SPLIT_DEFAULT;
}
代码示例来源:origin: biz.aQute.bnd/bnd
private int getSplitStrategy(String type) {
if (type == null)
return SPLIT_DEFAULT;
if (type.equals("merge-last"))
return SPLIT_MERGE_LAST;
if (type.equals("merge-first"))
return SPLIT_MERGE_FIRST;
if (type.equals("error"))
return SPLIT_ERROR;
if (type.equals("first"))
return SPLIT_FIRST;
error("Invalid strategy for split-package: " + type);
return SPLIT_DEFAULT;
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
private static EnumSet<Parameter> parseParams(Builder builder, final String... args) {
EnumSet<Parameter> parameters = EnumSet.noneOf(Parameter.class);
// Skip the key name, so start at index 1
for (int ix = 1; ix < args.length; ix++) {
String name = args[ix].toUpperCase();
try {
parameters.add(Parameter.valueOf(name));
} catch (IllegalArgumentException ex) {
builder.error("Could not parse argument for ${permissions}: %s", args[ix]);
}
}
return parameters;
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
private static EnumSet<Parameter> parseParams(Builder builder, final String... args) {
EnumSet<Parameter> parameters = EnumSet.noneOf(Parameter.class);
// Skip the key name, so start at index 1
for (int ix = 1; ix < args.length; ix++) {
String name = args[ix].toUpperCase();
try {
parameters.add(Parameter.valueOf(name));
} catch (IllegalArgumentException ex) {
builder.error("Could not parse argument for ${permissions}: %s", args[ix]);
}
}
return parameters;
}
代码示例来源:origin: biz.aQute.bnd/bndlib
public Pattern getDoNotCopy() {
if (xdoNotCopy == null) {
String string = null;
try {
string = getProperty(DONOTCOPY, DEFAULT_DO_NOT_COPY);
xdoNotCopy = Pattern.compile(string);
}
catch (Exception e) {
error("Invalid value for %s, value is %s", DONOTCOPY, string);
xdoNotCopy = Pattern.compile(DEFAULT_DO_NOT_COPY);
}
}
return xdoNotCopy;
}
代码示例来源:origin: biz.aQute/bndlib
public Pattern getDoNotCopy() {
if (xdoNotCopy == null) {
String string = null;
try {
string = getProperty(DONOTCOPY, DEFAULT_DO_NOT_COPY);
xdoNotCopy = Pattern.compile(string);
}
catch (Exception e) {
error("Invalid value for %s, value is %s", DONOTCOPY, string);
xdoNotCopy = Pattern.compile(DEFAULT_DO_NOT_COPY);
}
}
return xdoNotCopy;
}
代码示例来源:origin: biz.aQute.bnd/bnd
public Pattern getDoNotCopy() {
if (xdoNotCopy == null) {
String string = null;
try {
string = getProperty(DONOTCOPY, DEFAULT_DO_NOT_COPY);
xdoNotCopy = Pattern.compile(string);
}
catch (Exception e) {
error("Invalid value for %s, value is %s", DONOTCOPY, string);
xdoNotCopy = Pattern.compile(DEFAULT_DO_NOT_COPY);
}
}
return xdoNotCopy;
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
public Pattern getDoNotCopy() {
if (xdoNotCopy == null) {
String string = null;
try {
string = mergeProperties(DONOTCOPY);
if (string == null || string.isEmpty())
string = DEFAULT_DO_NOT_COPY;
xdoNotCopy = Pattern.compile(string);
} catch (Exception e) {
error("Invalid value for %s, value is %s", DONOTCOPY, string).header(DONOTCOPY);
xdoNotCopy = Pattern.compile(DEFAULT_DO_NOT_COPY);
}
}
return xdoNotCopy;
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
public Pattern getDoNotCopy() {
if (xdoNotCopy == null) {
String string = null;
try {
string = mergeProperties(DONOTCOPY);
if (string == null || string.isEmpty())
string = DEFAULT_DO_NOT_COPY;
xdoNotCopy = Pattern.compile(string);
} catch (Exception e) {
error("Invalid value for %s, value is %s", DONOTCOPY, string).header(DONOTCOPY);
xdoNotCopy = Pattern.compile(DEFAULT_DO_NOT_COPY);
}
}
return xdoNotCopy;
}
代码示例来源:origin: biz.aQute.bnd/bndlib
public Collection<File> getSourcePath() {
if (firstUse) {
firstUse = false;
String sp = getProperty(SOURCEPATH);
if (sp != null) {
Parameters map = parseHeader(sp);
for (Iterator<String> i = map.keySet().iterator(); i.hasNext();) {
String file = i.next();
if (!isDuplicate(file)) {
File f = getFile(file);
if (!f.isDirectory()) {
error("Adding a sourcepath that is not a directory: " + f);
} else {
sourcePath.add(f);
}
}
}
}
}
return sourcePath;
}
代码示例来源:origin: biz.aQute/bndlib
public Collection<File> getSourcePath() {
if (firstUse) {
firstUse = false;
String sp = getProperty(SOURCEPATH);
if (sp != null) {
Parameters map = parseHeader(sp);
for (Iterator<String> i = map.keySet().iterator(); i.hasNext();) {
String file = i.next();
if (!isDuplicate(file)) {
File f = getFile(file);
if (!f.isDirectory()) {
error("Adding a sourcepath that is not a directory: " + f);
} else {
sourcePath.add(f);
}
}
}
}
}
return sourcePath;
}
代码示例来源:origin: biz.aQute/bndlib
private void noSuchFile(Jar jar, @SuppressWarnings("unused") String clause, Map<String,String> extra, String source, String destinationPath)
throws Exception {
Jar src = getJarFromName(source, "Include-Resource " + source);
if (src != null) {
// Do not touch the manifest so this also
// works for signed files.
src.setDoNotTouchManifest();
JarResource jarResource = new JarResource(src);
jar.putResource(destinationPath, jarResource);
} else {
Resource lastChance = make.process(source);
if (lastChance != null) {
String x = extra.get("extra");
if (x != null)
lastChance.setExtra(x);
jar.putResource(destinationPath, lastChance);
} else
error("Input file does not exist: " + source);
}
}
内容来源于网络,如有侵权,请联系作者删除!