summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java36
-rw-r--r--client-compiled/build.xml1
-rw-r--r--common.xml3
-rw-r--r--server/build.xml1
-rw-r--r--themes/build.xml3
5 files changed, 20 insertions, 24 deletions
diff --git a/buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java b/buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java
index 33c822193a..0a69fbdf97 100644
--- a/buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java
+++ b/buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java
@@ -123,18 +123,15 @@ public class GeneratePackageExports {
HashSet<String> packages = new HashSet<String>();
for (Enumeration<JarEntry> it = jar.entries(); it.hasMoreElements();) {
JarEntry entry = it.nextElement();
- if (!entry.getName().endsWith(".class")) {
+
+ boolean classFile = entry.getName().endsWith(".class");
+ boolean directory = entry.isDirectory();
+
+ if (!classFile && !directory) {
continue;
}
- boolean accept = false;
- for (String prefix : acceptedPackagePrefixes) {
- if (entry.getName().startsWith(prefix)) {
- accept = true;
- break;
- }
- }
- if (!accept) {
+ if (!acceptEntry(entry.getName(), acceptedPackagePrefixes)) {
continue;
}
@@ -144,19 +141,16 @@ public class GeneratePackageExports {
packages.add(pkg);
}
- // List theme packages
- for (Enumeration<JarEntry> it = jar.entries(); it.hasMoreElements();) {
- JarEntry entry = it.nextElement();
- if (entry.isDirectory()
- && entry.getName().startsWith("VAADIN/themes")) {
- // Strip ending slash
- int lastSlash = entry.getName().lastIndexOf('/');
- String pkg = entry.getName().substring(0, lastSlash)
- .replace('/', '.');
- packages.add(pkg);
+ return packages;
+ }
+
+ private static boolean acceptEntry(String name,
+ List<String> acceptedPackagePrefixes) {
+ for (String prefix : acceptedPackagePrefixes) {
+ if (name.startsWith(prefix)) {
+ return true;
}
}
-
- return packages;
+ return false;
}
}
diff --git a/client-compiled/build.xml b/client-compiled/build.xml
index 8b2e76e183..d9f3da6271 100644
--- a/client-compiled/build.xml
+++ b/client-compiled/build.xml
@@ -109,6 +109,7 @@
<target name="jar" depends="default-widgetset">
<antcall target="common.jar">
+ <param name="osgi.extra.package.prefixes" value="VAADIN/widgetsets/" />
<reference torefid="extra.jar.includes" refid="jar.includes" />
</antcall>
</target>
diff --git a/common.xml b/common.xml
index 0b2d82e2a2..679853646f 100644
--- a/common.xml
+++ b/common.xml
@@ -240,8 +240,7 @@
<!-- Generate the Export-Package attribute in the manifest -->
<java classname="com.vaadin.buildhelpers.GeneratePackageExports" failonerror="true" fork="yes">
<arg value="${jar}" />
- <arg value="com/vaadin" />
- <arg value="com/google" />
+ <arg line="com/vaadin com/google ${osgi.extra.package.prefixes}" />
<classpath refid="vaadin.buildhelpers.classpath" />
<jvmarg value="-Dvaadin.version=${vaadin.version}" />
</java>
diff --git a/server/build.xml b/server/build.xml
index 53ded1218d..d6b6d7b38c 100644
--- a/server/build.xml
+++ b/server/build.xml
@@ -27,6 +27,7 @@
<antcall target="common.jar">
<param name="require-bundle" value="com.vaadin.shared;bundle-version=&quot;${vaadin.version}&quot;"/>
<param name="import-package" value="${server.osgi.import}" />
+ <param name="osgi.extra.package.prefixes" value="VAADIN" />
<reference torefid="extra.jar.includes" refid="jar.includes" />
</antcall>
</target>
diff --git a/themes/build.xml b/themes/build.xml
index 11a4e59184..a504d585dd 100644
--- a/themes/build.xml
+++ b/themes/build.xml
@@ -13,7 +13,7 @@
<property name="module.name" value="vaadin-themes" />
<property name="module.symbolic" value="com.vaadin.themes" />
<property name="result.dir" value="result" />
- <property name="theme.result.dir" value="${result.dir}/VAADIN/themes" />
+ <property name="theme.result.dir" value="${result.dir}/VAADIN/themes/" />
<union id="jar.includes">
<fileset dir="${result.dir}">
@@ -44,6 +44,7 @@
<target name="jar" depends="compile-themes">
<antcall target="common.jar">
+ <param name="osgi.extra.package.prefixes" value="VAADIN/themes" />
<reference torefid="extra.jar.includes" refid="jar.includes" />
</antcall>
</target>