summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Dahlström <johannesd@vaadin.com>2012-10-09 09:24:23 +0000
committerVaadin Code Review <review@vaadin.com>2012-10-09 09:24:23 +0000
commit7ef8c92c271536e6b0c972b5052f1be61984d8d0 (patch)
treefa0f85b10b992e498ee66e36b72abd6f029a4cc6
parenta6fc9bc83ec2e56e660e55c09f69db633cc75502 (diff)
parent59edcbc490f55a0a9c3ad922950d21b6a755bc22 (diff)
downloadvaadin-framework-7ef8c92c271536e6b0c972b5052f1be61984d8d0.tar.gz
vaadin-framework-7ef8c92c271536e6b0c972b5052f1be61984d8d0.zip
Merge "Add version to exported packages (#7222)"
-rw-r--r--buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java16
-rw-r--r--common.xml1
2 files changed, 12 insertions, 5 deletions
diff --git a/buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java b/buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java
index bf9bd7e068..33c822193a 100644
--- a/buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java
+++ b/buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java
@@ -29,9 +29,11 @@ public class GeneratePackageExports {
if (args.length < 2) {
System.err
.println("Invalid number of parameters\n"
- + "Usage: java -cp .. GenerateManifest <package.jar> <accepted package prefixes>");
+ + "Usage: java -cp .. GenerateManifest <package.jar> <accepted package prefixes>\n"
+ + "Use -Dvaadin.version to specify the version to be used for the packages");
System.exit(1);
}
+ String vaadinVersion = System.getProperty("vaadin.version");
// Open the JAR
String jarFilename = args[0];
@@ -57,7 +59,7 @@ public class GeneratePackageExports {
return;
}
- String exportPackage = sortAndJoinPackages(packages);
+ String exportPackage = sortAndJoinPackages(packages, vaadinVersion);
// Read old manifest
Manifest oldMF = null;
@@ -95,7 +97,8 @@ public class GeneratePackageExports {
}
}
- private static String sortAndJoinPackages(HashSet<String> packages) {
+ private static String sortAndJoinPackages(HashSet<String> packages,
+ String vaadinVersion) {
// Produce an ordered listing of the package names
String packageArray[] = new String[packages.size()];
packages.toArray(packageArray);
@@ -105,8 +108,11 @@ public class GeneratePackageExports {
if (i != 0) {
joinedPackages.append(",");
}
-
- joinedPackages.append(packageArray[i]);
+ String packageAndVersion = packageArray[i];
+ if (vaadinVersion != null) {
+ packageAndVersion += ";version=\"" + vaadinVersion + "\"";
+ }
+ joinedPackages.append(packageAndVersion);
}
return joinedPackages.toString();
diff --git a/common.xml b/common.xml
index 4b86bfaa33..0875fea71a 100644
--- a/common.xml
+++ b/common.xml
@@ -244,6 +244,7 @@
<arg value="com/vaadin" />
<arg value="com/google" />
<classpath refid="vaadin.buildhelpers.classpath" />
+ <jvmarg value="-Dvaadin.version=${vaadin.version}" />
</java>
</target>