summaryrefslogtreecommitdiffstats
path: root/buildhelpers/src
diff options
context:
space:
mode:
Diffstat (limited to 'buildhelpers/src')
-rw-r--r--buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java b/buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java
index 9dd51f8c6d..0d8f117329 100644
--- a/buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java
+++ b/buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java
@@ -26,6 +26,7 @@ import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.jar.Manifest;
import java.util.logging.Logger;
+import java.util.regex.Pattern;
/**
* Generates Export-Packages attribute for OSGi compatible manifest.
@@ -172,6 +173,9 @@ public class GeneratePackageExports {
private static HashSet<String> getPackages(JarFile jar,
List<String> acceptedPackagePrefixes) {
HashSet<String> packages = new HashSet<String>();
+
+ Pattern startsWithNumber = Pattern.compile("\\.\\d");
+
for (Enumeration<JarEntry> it = jar.entries(); it.hasMoreElements();) {
JarEntry entry = it.nextElement();
@@ -189,6 +193,11 @@ public class GeneratePackageExports {
int lastSlash = entry.getName().lastIndexOf('/');
String pkg = entry.getName().substring(0, lastSlash)
.replace('/', '.');
+
+ if (startsWithNumber.matcher(pkg).find()) {
+ continue;
+ }
+
packages.add(pkg);
}