summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShireesh Anjal <shireesh@gluster.com>2011-12-12 15:52:51 +0530
committerShireesh Anjal <shireesh@gluster.com>2011-12-12 15:52:51 +0530
commit12a8f8bacffa9e7e6d600ac4d7e95c7d46b836e3 (patch)
tree4f8c1ebeb64e900ceb5e20f9756f2de01996db2e
parent5fee99642f7726955dd1721e1b90a8865e9fe050 (diff)
Modified to include API version number in root JNLP file, and rename the feature jnlp file appropriately during build.
Modified ClientUtil to pick up the API version number from the system property gluster.api.version
-rwxr-xr-xbuild/gmc-build.sh1
-rw-r--r--src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/constants/ClientConstants.java3
-rw-r--r--src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/utils/ClientUtil.java6
-rw-r--r--src/org.gluster.storage.management.console.feature.webstart/buckminster.cspex6
-rw-r--r--src/org.gluster.storage.management.console.feature.webstart/build/glustermc.ant15
-rw-r--r--src/org.gluster.storage.management.console.feature.webstart/rootfiles/gluster-management-console.jnlp5
6 files changed, 33 insertions, 3 deletions
diff --git a/build/gmc-build.sh b/build/gmc-build.sh
index 5957561..94f1463 100755
--- a/build/gmc-build.sh
+++ b/build/gmc-build.sh
@@ -149,6 +149,7 @@ build_gmc()
buckminster_perform -Dproduct.version=${VERSION} ${GMC_CONSOLE_PROJECT}#update.version
buckminster_perform -Dtarget.os=${os} -Dtarget.ws=${ws} -Dtarget.arch=${arch} ${GMC_WEBSTART_PROJECT}#create.eclipse.jnlp.product
buckminster_perform ${GMC_WEBSTART_PROJECT}#copy.root.files
+ buckminster_perform -Dproduct.version=${VERSION} ${GMC_WEBSTART_PROJECT}#update.version
# buckminster signs the jars using eclipse certificate - hence unsign and sign them again
echo "Signing product jars..."
diff --git a/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/constants/ClientConstants.java b/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/constants/ClientConstants.java
index f683a50..6a8f0e5 100644
--- a/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/constants/ClientConstants.java
+++ b/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/constants/ClientConstants.java
@@ -25,7 +25,8 @@ public class ClientConstants {
public static final String SYS_PROP_SERVER_URL = "gluster.server.url";
public static final String DEFAULT_SERVER_URL = "https://localhost:8443/glustermg/linux.gtk.x86_64";
public static final String CONTEXT_ROOT = "glustermg";
- public static final String REST_API_VERSION = "1.0.0";
+ public static final String SYS_PROP_API_VERSION = "gluster.api.version";
+ public static final String DEFAULT_API_VERSION = "1.0.0";
// SSL related
public static final String TRUSTED_KEYSTORE = "gmc-trusted.keystore";
diff --git a/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/utils/ClientUtil.java b/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/utils/ClientUtil.java
index ed05ad1..a4d665f 100644
--- a/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/utils/ClientUtil.java
+++ b/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/utils/ClientUtil.java
@@ -28,7 +28,11 @@ import org.gluster.storage.management.client.constants.ClientConstants;
public class ClientUtil {
public static URI getServerBaseURI() {
- return UriBuilder.fromUri(getBaseURL()).path(ClientConstants.REST_API_VERSION).build();
+ return UriBuilder.fromUri(getBaseURL()).path(getAPIVersion()).build();
+ }
+
+ private static String getAPIVersion() {
+ return System.getProperty(ClientConstants.SYS_PROP_API_VERSION, ClientConstants.DEFAULT_API_VERSION);
}
private static String getBaseURL() {
diff --git a/src/org.gluster.storage.management.console.feature.webstart/buckminster.cspex b/src/org.gluster.storage.management.console.feature.webstart/buckminster.cspex
index 252a5e1..7a7a9b9 100644
--- a/src/org.gluster.storage.management.console.feature.webstart/buckminster.cspex
+++ b/src/org.gluster.storage.management.console.feature.webstart/buckminster.cspex
@@ -37,5 +37,11 @@
<property key="targets" value="copy.root.files" />
</actorProperties>
</public>
+ <public name="update.version" actor="ant">
+ <actorProperties>
+ <property key="buildFile" value="build/glustermc.ant" />
+ <property key="targets" value="update.version" />
+ </actorProperties>
+ </public>
</actions>
</cspecExtension>
diff --git a/src/org.gluster.storage.management.console.feature.webstart/build/glustermc.ant b/src/org.gluster.storage.management.console.feature.webstart/build/glustermc.ant
index 93bf3cc..a1dc0c6 100644
--- a/src/org.gluster.storage.management.console.feature.webstart/build/glustermc.ant
+++ b/src/org.gluster.storage.management.console.feature.webstart/build/glustermc.ant
@@ -1,5 +1,7 @@
<project>
<property name="export.dir" value="${buckminster.output}/glustermc/" />
+ <property name="jnlp.file" value="${export.dir}/gluster-management-console.jnlp" />
+
<target name='unsign'>
<buckminster.signatureCleaner>
<fileset dir='${export.dir}/plugins'>
@@ -27,4 +29,17 @@
<fileset dir="${basedir}/rootfiles" />
</copy>
</target>
+
+ <target name='update.version'>
+ <replace file="${jnlp.file}" token="@VERSION@" value="${product.version}" />
+ <move todir="${export.dir}">
+ <fileset dir="${export.dir}" />
+ <mapper>
+ <mapper type="regexp"
+ from="org.gluster.storage.management.console.feature_.*.jnlp"
+ to="org.gluster.storage.management.console.feature_${product.version}.jnlp" />
+ </mapper>
+ </move>
+ </target>
+
</project>
diff --git a/src/org.gluster.storage.management.console.feature.webstart/rootfiles/gluster-management-console.jnlp b/src/org.gluster.storage.management.console.feature.webstart/rootfiles/gluster-management-console.jnlp
index ee33397..b5417bb 100644
--- a/src/org.gluster.storage.management.console.feature.webstart/rootfiles/gluster-management-console.jnlp
+++ b/src/org.gluster.storage.management.console.feature.webstart/rootfiles/gluster-management-console.jnlp
@@ -20,7 +20,7 @@
<jar href="plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar" main="true"/>
<extension
name="Gluster Management Console"
- href="org.gluster.storage.management.console.feature_1.0.0.jnlp"/>
+ href="org.gluster.storage.management.console.feature_@VERSION@.jnlp"/>
<property
name="osgi.instance.area"
value="@user.home/Application Data/glustermc"/>
@@ -33,6 +33,9 @@
<property
name="gluster.server.url"
value="$$codebase"/>
+ <property
+ name="gluster.api.version"
+ value="@VERSION@"/>
<property
name="javaws.cfg.jauthenticator"
value="true"/>