[gatein-commits] gatein SVN: r2351 - in components/wsrp/trunk: common/src/main/java/org/gatein/wsrp and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Mar 23 21:47:10 EDT 2010


Author: chris.laprun at jboss.com
Date: 2010-03-23 21:47:09 -0400 (Tue, 23 Mar 2010)
New Revision: 2351

Modified:
   components/wsrp/trunk/UpdateWSRPForGateIn.sh
   components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPConstants.java
Log:
- Added WSRP_SERVICE_VERSION to be able to display version of the WSRP service if needed.
- Made JMX constants deprecated in WSRPConstants.
- Improved update script:
  + Check that WSRP_SERVICE_VERSION is in sync with module version as specified by the project POM.
  + Improved display when an action is required by the user.
  + Perform check before attempting to build.
  + Do not build anymore if any argument is passed to the script.

Modified: components/wsrp/trunk/UpdateWSRPForGateIn.sh
===================================================================
--- components/wsrp/trunk/UpdateWSRPForGateIn.sh	2010-03-23 22:58:59 UTC (rev 2350)
+++ components/wsrp/trunk/UpdateWSRPForGateIn.sh	2010-03-24 01:47:09 UTC (rev 2351)
@@ -23,11 +23,9 @@
 # application server.
 # @author Chris Laprun
 
-mvn clean install
-
 if [ -z "$GATEIN_EAR_HOME" -o ! -d "$GATEIN_EAR_HOME" ]
 then
-   echo Please set GATEIN_EAR_HOME to point to the repository on your application that contains gatein.ear
+   echo \=\=\> Please set GATEIN_EAR_HOME to point to the repository on your application that contains gatein.ear
    exit
 fi
 echo Using GateIn home at: $GATEIN_EAR_HOME
@@ -39,9 +37,23 @@
 DEPLOYED_WSRP=`ls $GATEIN_EAR_HOME/lib/wsrp* | sed -n '1 s/.*\/.*-\([0-9]\.[0-9].[0-9]-.*-.*\).jar/\1/p'`
 
 echo Deployed WSRP version: \'$DEPLOYED_WSRP\'
-echo Current WSRP version: \'$CURRENT_WSRP\'
+echo Current WSRP version in project POM: \'$CURRENT_WSRP\'
 echo
 
+# Check that WSRP service version as defined by WSRPConstants.WSRP_SERVICE_VERSION is in sync with project POM
+WSRP_SERVICE_VERSION=`grep WSRP_SERVICE_VERSION common/src/main/java/org/gatein/wsrp/WSRPConstants.java | sed -n -e 's/.*"\(.*\)".*/\1/p'`
+if [ $WSRP_SERVICE_VERSION != $CURRENT_WSRP ]
+then
+   echo \=\=\> Please update WSRPConstants.WSRP_SERVICE_VERSION \($WSRP_SERVICE_VERSION\) as it doesn\'t match the value in the project POM
+   exit
+fi
+
+# If we have no argument, build. If you don't want to build just add an argument (value irrelevant) when calling the script
+if [ $# -eq 0 ]
+then
+   mvn clean install
+fi
+
 # get the list of jar files we need to replace in lib
 current=`ls $GATEIN_EAR_HOME/lib/wsrp* | sed -n 's/.*\/\(.*\)-'$DEPLOYED_WSRP'.jar/\1/p'`
 

Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPConstants.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPConstants.java	2010-03-23 22:58:59 UTC (rev 2350)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPConstants.java	2010-03-24 01:47:09 UTC (rev 2351)
@@ -43,10 +43,16 @@
 {
    // JMX **************************************************************************************************************
    /** JMX object name for the Portal web app registry */
-   public static final String WEB_APP_REGISTRY_OBJECT_NAME = "portal:service=WebAppRegistry";
+   @Deprecated public static final String WEB_APP_REGISTRY_OBJECT_NAME = "portal:service=WebAppRegistry";
    /** JMX object name for the WSRP Producer */
-   public static final String WSRP_PRODUCER_OBJECT_NAME = "portletcontainer.wsrp:service=WSRPProducer";
+   @Deprecated public static final String WSRP_PRODUCER_OBJECT_NAME = "portletcontainer.wsrp:service=WSRPProducer";
 
+   /**
+    * The version of the WSRP service. This should match the maven version of the module. Right now, checked via
+    * the UpdateWSRPForGatein.sh script.
+    */
+   public static final String WSRP_SERVICE_VERSION = "1.0.1-GA-SNAPSHOT";
+
    // Window State Names ***********************************************************************************************
 
    /**



More information about the gatein-commits mailing list