summaryrefslogtreecommitdiffstats
path: root/buildhelpers
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2015-03-03 15:11:23 +0200
committerVaadin Code Review <review@vaadin.com>2015-03-03 13:44:33 +0000
commit6e6dd6ff0d64917effed33c7253c3b135183c355 (patch)
treeccb1037c39eff380d3f7cc34c0c879ee936fcdf1 /buildhelpers
parent91564dfe760d593fdd55aa4f820d6f2fdc181065 (diff)
downloadvaadin-framework-6e6dd6ff0d64917effed33c7253c3b135183c355.tar.gz
vaadin-framework-6e6dd6ff0d64917effed33c7253c3b135183c355.zip
Always include default widget set files in OSGi manifest (#16993)
Change-Id: Ib1fc01ced602d3434a0ad63725601237a0def4d1
Diffstat (limited to 'buildhelpers')
-rw-r--r--buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java b/buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java
index 0d8f117329..d4ad3f838c 100644
--- a/buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java
+++ b/buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java
@@ -47,7 +47,8 @@ public class GeneratePackageExports {
System.err
.println("Invalid number of parameters\n"
+ "Usage: java -cp .. GenerateManifest <package.jar> <accepted package prefixes>\n"
- + "Use -Dvaadin.version to specify the version to be used for the packages");
+ + "Use -Dvaadin.version to specify the version to be used for the packages\n"
+ + "Use -DincludeNumberPackages=1 to include package names which start with a number (not 100% OSGi compatible)");
System.exit(1);
}
@@ -67,8 +68,14 @@ public class GeneratePackageExports {
acceptedPackagePrefixes.add(args[i]);
}
+ boolean includeNumberPackages = false;
+ if ("1".equals(System.getProperty("includeNumberPackages"))) {
+ includeNumberPackages = true;
+ }
+
// List the included Java packages
- HashSet<String> packages = getPackages(jar, acceptedPackagePrefixes);
+ HashSet<String> packages = getPackages(jar, acceptedPackagePrefixes,
+ includeNumberPackages);
// Avoid writing empty Export-Package attribute
if (packages.isEmpty()) {
@@ -171,7 +178,7 @@ public class GeneratePackageExports {
}
private static HashSet<String> getPackages(JarFile jar,
- List<String> acceptedPackagePrefixes) {
+ List<String> acceptedPackagePrefixes, boolean includeNumberPackages) {
HashSet<String> packages = new HashSet<String>();
Pattern startsWithNumber = Pattern.compile("\\.\\d");
@@ -194,7 +201,7 @@ public class GeneratePackageExports {
String pkg = entry.getName().substring(0, lastSlash)
.replace('/', '.');
- if (startsWithNumber.matcher(pkg).find()) {
+ if (!includeNumberPackages && startsWithNumber.matcher(pkg).find()) {
continue;
}