/** * Allow any local initialization by subclasses before we build. */ public void init() throws Exception { begin(); doRequireBnd(); // Check if we have sensible setup if (getClasspath().size() == 0 && (getProperty(EXPORT_PACKAGE) != null || getProperty(EXPORT_PACKAGE) != null || getProperty(PRIVATE_PACKAGE) != null || getProperty(PRIVATEPACKAGE) != null)) warning("Classpath is empty. " + Constants.PRIVATE_PACKAGE + " (-privatepackage) and " + EXPORT_PACKAGE + " can only expand from the classpath when there is one"); }
/** * Allow any local initialization by subclasses before we build. */ public void init() throws Exception { begin(); doRequireBnd(); // Check if we have sensible setup if (getClasspath().size() == 0 && (getProperty(EXPORT_PACKAGE) != null || getProperty(EXPORT_PACKAGE) != null || getProperty(PRIVATE_PACKAGE) != null || getProperty(PRIVATEPACKAGE) != null)) warning("Classpath is empty. " + Constants.PRIVATE_PACKAGE + " (-privatepackage) and " + EXPORT_PACKAGE + " can only expand from the classpath when there is one"); }
/** * Allow any local initialization by subclasses before we build. */ public void init() throws Exception { begin(); doRequireBnd(); // Check if we have sensible setup if (getClasspath().size() == 0 && (getProperty(EXPORT_PACKAGE) != null || getProperty(EXPORT_PACKAGE) != null || getProperty(PRIVATE_PACKAGE) != null || getProperty(PRIVATEPACKAGE) != null)) warning("Classpath is empty. " + Constants.PRIVATE_PACKAGE + " (-privatepackage) and " + EXPORT_PACKAGE + " can only expand from the classpath when there is one"); }
/** * Allow any local initialization by subclasses before we build. */ public void init() throws Exception { begin(); doRequireBnd(); // Check if we have sensible setup if (getClasspath().size() == 0 && (getProperty(EXPORT_PACKAGE) != null || getProperty(EXPORT_PACKAGE) != null || getProperty(PRIVATE_PACKAGE) != null || getProperty(PRIVATEPACKAGE) != null)) warning("Classpath is empty. " + Constants.PRIVATE_PACKAGE + " (-privatepackage) and " + EXPORT_PACKAGE + " can only expand from the classpath when there is one"); }
public boolean hasSources() { return isTrue(getProperty(SOURCES)); }
public boolean hasSources() { return isTrue(getProperty(SOURCES)); }
public boolean hasSources() { return isTrue(getProperty(SOURCES)); }
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 boolean hasSources() { return isTrue(getProperty(SOURCES)); }
/** * Allow any local initialization by subclasses before we build. */ public void init() throws Exception { begin(); doRequireBnd(); // Check if we have sensible setup if (getClasspath().size() == 0 && (getProperty(EXPORT_PACKAGE) != null || getProperty(EXPORT_PACKAGE) != null || getProperty(PRIVATE_PACKAGE) != null)) warning("Classpath is empty. Private-Package and Export-Package can only expand from the classpath when there is one"); }
private Instructions getPreProcessMatcher(Map<String,String> extra) { if (defaultPreProcessMatcher == null) { defaultPreProcessMatcher = new Instructions(getProperty(PREPROCESSMATCHERS, Constants.DEFAULT_PREPROCESSS_MATCHERS)); } if (extra == null) return defaultPreProcessMatcher; String additionalMatchers = extra.get(PREPROCESSMATCHERS); if (additionalMatchers == null) return defaultPreProcessMatcher; Instructions specialMatcher = new Instructions(additionalMatchers); specialMatcher.putAll(defaultPreProcessMatcher); return specialMatcher; }
Map<Instruction,Map<String,String>> getMakeHeader() { if (make != null) return make; make = Processor.newMap(); String s = builder.getProperty(Builder.MAKE); Parameters make = builder.parseHeader(s); for (Entry<String,Attrs> entry : make.entrySet()) { String pattern = Processor.removeDuplicateMarker(entry.getKey()); Instruction instr = new Instruction(pattern); this.make.put(instr, entry.getValue()); } return this.make; } }
Map<Instruction,Map<String,String>> getMakeHeader() { if (make != null) return make; make = Processor.newMap(); String s = builder.getProperty(Builder.MAKE); Parameters make = builder.parseHeader(s); for (Entry<String,Attrs> entry : make.entrySet()) { String pattern = Processor.removeDuplicateMarker(entry.getKey()); Instruction instr = new Instruction(pattern); this.make.put(instr, entry.getValue()); } return this.make; } }
Map<Instruction,Map<String,String>> getMakeHeader() { if (make != null) return make; make = Processor.newMap(); String s = builder.getProperty(Builder.MAKE); Parameters make = builder.parseHeader(s); for (Entry<String,Attrs> entry : make.entrySet()) { String pattern = Processor.removeDuplicateMarker(entry.getKey()); Instruction instr = new Instruction(pattern); this.make.put(instr, entry.getValue()); } return this.make; } }
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)); } }
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)); } }
/** * Check if we need to calculate any checksums. * * @param dot * @throws Exception */ private void doDigests(Jar dot) throws Exception { Parameters ps = OSGiHeader.parseHeader(getProperty(DIGESTS)); if (ps.isEmpty()) return; trace("digests %s", ps); String[] digests = ps.keySet().toArray(new String[ps.size()]); dot.setDigestAlgorithms(digests); }
/** * Check if we need to calculate any checksums. * * @param dot * @throws Exception */ private void doDigests(Jar dot) throws Exception { Parameters ps = OSGiHeader.parseHeader(getProperty(DIGESTS)); if (ps.isEmpty()) return; trace("digests %s", ps); String[] digests = ps.keySet().toArray(new String[ps.size()]); dot.setDigestAlgorithms(digests); }
/** * Check if we need to calculate any checksums. * * @param dot * @throws Exception */ private void doDigests(Jar dot) throws Exception { Parameters ps = OSGiHeader.parseHeader(getProperty(DIGESTS)); if (ps.isEmpty()) return; trace("digests %s", ps); String[] digests = ps.keySet().toArray(new String[ps.size()]); dot.setDigestAlgorithms(digests); }
/** * 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); } }