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:
parent
f449ada1fb
commit
fda28189a0
1 changed files with 7 additions and 1 deletions
|
@ -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("/")) {
|
||||
|
|
Loading…
Add table
Reference in a new issue