public final static String PROP_SLC_OSGIBOOT_DEBUG = "slc.osgiboot.debug";
public final static String DEFAULT_BASE_URL = "reference:file:";
+ public final static String EXCLUDES_SVN_PATTERN = "**/.svn/**";
private Boolean debug = Boolean.parseBoolean(System.getProperty(
PROP_SLC_OSGIBOOT_DEBUG, "false"));
+ private boolean excludeSvn = true;
+
private final BundleContext bundleContext;
public OsgiBoot(BundleContext bundleContext) {
return urls;
bundleLocations = SystemPropertyUtils
.resolvePlaceholders(bundleLocations);
+ if (debug)
+ debug(PROP_SLC_OSGI_LOCATIONS + "=" + bundleLocations);
StringTokenizer st = new StringTokenizer(bundleLocations,
File.pathSeparator);
List<BundlesSet> bundlesSets = new ArrayList<BundlesSet>();
if (bundlePatterns == null)
return urls;
- // TODO: resolve placeholders
- info(PROP_SLC_OSGI_BUNDLES + "=" + bundlePatterns);
+ bundlePatterns = SystemPropertyUtils
+ .resolvePlaceholders(bundlePatterns);
+ if (debug)
+ debug(PROP_SLC_OSGI_BUNDLES + "=" + bundlePatterns
+ + " (excludeSvn=" + excludeSvn + ")");
StringTokenizer st = new StringTokenizer(bundlePatterns, ",");
while (st.hasMoreTokens()) {
return bundleContext;
}
- private class BundlesSet {
+ /** Whether to exclude Subversion directories (true by default) */
+ public boolean isExcludeSvn() {
+ return excludeSvn;
+ }
+
+ public void setExcludeSvn(boolean excludeSvn) {
+ this.excludeSvn = excludeSvn;
+ }
+
+ protected class BundlesSet {
private String baseUrl = "reference:file";// not used yet
private final String dir;
private List<String> includes = new ArrayList<String>();
System.err.println("Unkown bundles pattern type " + type);
}
}
+
+ if (excludeSvn && !excludes.contains(EXCLUDES_SVN_PATTERN)) {
+ excludes.add(EXCLUDES_SVN_PATTERN);
+ }
}
public String getDir() {