summaryrefslogtreecommitdiffstats
path: root/java/sca
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-08-19 00:04:33 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-08-19 00:04:33 +0000
commitfda28189a011cfb409e952b62c3e55a77b6be2bc (patch)
treeeef6d287c085cd1f175c832318bf2d6c48bb1e1a /java/sca
parentf449ada1fb543ed96ebd7f22afa6d1c0a8126bb1 (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.java8
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("/")) {