diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-08-19 00:04:33 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-08-19 00:04:33 +0000 |
commit | fda28189a011cfb409e952b62c3e55a77b6be2bc (patch) | |
tree | eef6d287c085cd1f175c832318bf2d6c48bb1e1a /java/sca | |
parent | f449ada1fb543ed96ebd7f22afa6d1c0a8126bb1 (diff) |
Add a filter to exclude files in the development mode (a bundle as a PDE project)
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@805632 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca')
-rw-r--r-- | java/sca/modules/contribution-osgi/src/main/java/org/apache/tuscany/sca/contribution/osgi/impl/OSGiBundleContributionScanner.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/java/sca/modules/contribution-osgi/src/main/java/org/apache/tuscany/sca/contribution/osgi/impl/OSGiBundleContributionScanner.java b/java/sca/modules/contribution-osgi/src/main/java/org/apache/tuscany/sca/contribution/osgi/impl/OSGiBundleContributionScanner.java index 5432412452..91f2bba5c5 100644 --- a/java/sca/modules/contribution-osgi/src/main/java/org/apache/tuscany/sca/contribution/osgi/impl/OSGiBundleContributionScanner.java +++ b/java/sca/modules/contribution-osgi/src/main/java/org/apache/tuscany/sca/contribution/osgi/impl/OSGiBundleContributionScanner.java @@ -134,13 +134,19 @@ public class OSGiBundleContributionScanner implements ContributionScanner { } try { + // Test if the bundle is an Eclipse project + boolean devMode = (bundle.getEntry("/.project") != null); // FIXME: The entries can come from fragments. Do we need to have a way to differentiate the entries? Enumeration<?> entries = bundle.findEntries("/", "*", true); while (entries.hasMoreElements()) { URL entry = (URL)entries.nextElement(); String entryName = entry.getPath(); - if (entryName.contains("/.svn/")) { + if (devMode && entryName.contains("/.svn/") + || entryName.startsWith("/.") + || entryName.startsWith("/target/") + || entryName.startsWith("/src/")) { // Ignore .svn files + // Ignore .classpath, .project, src, and target continue; } if (entryName.startsWith("/")) { |