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
This commit is contained in:
rfeng 2009-08-19 00:04:33 +00:00
parent f449ada1fb
commit fda28189a0

View file

@ -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("/")) {