summaryrefslogtreecommitdiffstats
path: root/buildhelpers/src
diff options
context:
space:
mode:
authorTeppo Kurki <teppo.kurki@vaadin.com>2014-12-16 12:50:22 +0200
committerVaadin Code Review <review@vaadin.com>2014-12-16 14:11:12 +0000
commitac31951998701ad20f8f2c80510ade754b167359 (patch)
tree8d65037e67fcb4bbf0ee346b909c461a06545e0c /buildhelpers/src
parent02d33ca7aea74f31319ce3920a7c67ac6f59571b (diff)
downloadvaadin-framework-ac31951998701ad20f8f2c80510ade754b167359.tar.gz
vaadin-framework-ac31951998701ad20f8f2c80510ade754b167359.zip
Removed packages starting with a digit from export-package (#15105)
The Runo theme icons have been duplicated to folders icons16, icons32 and icons64 which will be in the export-package declaration. Original folders with icons also remain. Change-Id: I19e481057a418e39a030359f62eefc3bc3d7f131
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);
}