/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
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; }
/** * 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; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }
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); } }