[jboss-cvs] JBossAS SVN: r105955 - in branches/JBPAPP_5_1: hornetq-int and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jun 11 05:39:19 EDT 2010


Author: ataylor
Date: 2010-06-11 05:39:19 -0400 (Fri, 11 Jun 2010)
New Revision: 105955

Added:
   branches/JBPAPP_5_1/hornetq-int/src/etc/build.xml
Modified:
   branches/JBPAPP_5_1/build/build-distr.xml
   branches/JBPAPP_5_1/hornetq-int/build.xml
   branches/JBPAPP_5_1/hornetq-int/src/etc/switch.sh
Log:
added ant script for hornetq switch

Modified: branches/JBPAPP_5_1/build/build-distr.xml
===================================================================
--- branches/JBPAPP_5_1/build/build-distr.xml	2010-06-11 09:14:18 UTC (rev 105954)
+++ branches/JBPAPP_5_1/build/build-distr.xml	2010-06-11 09:39:19 UTC (rev 105955)
@@ -816,7 +816,7 @@
      <property name="_module.output" override="true" value="${project.root}/${_module.name}/output"/>
       <mkdir dir="${install.root}"/>
       <mkdir dir="${install.root}/extras"/>
-      <mkdir dir="${install.root}/extras/hornetq"/>
+      <mkdir dir="${install.root}/extras/hornetq"/>                                                                                    
       <copy todir="${install.root}/extras/hornetq">
          <fileset dir="${_module.output}/">
              <include name="resources/*.xml"/>
@@ -833,6 +833,7 @@
          <fileset dir="${_module.output}/etc">
              <include name="switch.sh"/>
              <include name="README.txt"/>
+            <include name="build.xml"/>
          </fileset>
       </copy>
       <copy todir="${install.root}/extras/hornetq/resources">

Modified: branches/JBPAPP_5_1/hornetq-int/build.xml
===================================================================
--- branches/JBPAPP_5_1/hornetq-int/build.xml	2010-06-11 09:14:18 UTC (rev 105954)
+++ branches/JBPAPP_5_1/hornetq-int/build.xml	2010-06-11 09:39:19 UTC (rev 105955)
@@ -170,6 +170,7 @@
      <copy todir="output/etc">
         <fileset dir="${source.etc}">
           <include name="switch.sh"/>
+          <include name="build.xml"/>
         </fileset>
      </copy>
      <copy tofile="output/etc/examples/common/build.xml" file="${source.etc}/jms-examples-build.xml"/>

Added: branches/JBPAPP_5_1/hornetq-int/src/etc/build.xml
===================================================================
--- branches/JBPAPP_5_1/hornetq-int/src/etc/build.xml	                        (rev 0)
+++ branches/JBPAPP_5_1/hornetq-int/src/etc/build.xml	2010-06-11 09:39:19 UTC (rev 105955)
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2009 Red Hat, Inc.
+  ~ Red Hat licenses this file to you under the Apache License, version
+  ~ 2.0 (the "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~    http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+  ~ implied.  See the License for the specific language governing
+  ~ permissions and limitations under the License.
+  -->
+<project default="install" name="HornetQ Installer" basedir=".">
+
+   <property name="jboss_home" value="../../"/>
+   <property name="lib.dir" value="lib"/>
+   <property name="resources.dir" value="resources"/>
+
+   <target name="install" depends="removeCommon, removeClient, addCommon, addClient">
+
+      <antcall target="removeConfig">
+         <param name="CONFIG" value="standard"/>
+      </antcall>
+      <antcall target="createConfig">
+         <param name="CONFIG" value="standard"/>
+         <param name="CONFIG_TYPE" value="non-clustered"/>
+      </antcall>
+
+      <antcall target="removeConfig">
+         <param name="CONFIG" value="default"/>
+      </antcall>
+      <antcall target="createConfig">
+         <param name="CONFIG" value="default"/>
+         <param name="CONFIG_TYPE" value="non-clustered"/>
+      </antcall>
+
+      <antcall target="removeConfig">
+         <param name="CONFIG" value="all"/>
+      </antcall>
+      <antcall target="createConfig">
+         <param name="CONFIG" value="all"/>
+         <param name="CONFIG_TYPE" value="clustered"/>
+      </antcall>
+
+   </target>
+
+   <target name="removeCommon">
+      <echo>Removing Common JBoss Messaging Components</echo>
+      <delete file="${jboss_home}/common/lib/jboss-messaging.jar"/>
+      <delete file="${jboss_home}/common/lib/jboss-messaging-int.jar"/>
+   </target>
+   
+   <target  name="addCommon">
+      <echo>Adding HornetQ common components</echo>
+      <copy todir="${jboss_home}/common/lib">
+         <fileset dir="${lib.dir}">
+            <include name="hornetq-bootstrap.jar"/>
+            <include name="hornetq-core.jar"/>
+            <include name="hornetq-jboss-as-integration.jar"/>
+            <include name="hornetq-jms.jar"/>
+            <include name="hornetq-logging.jar"/>
+            <include name="hornetq-int.jar"/>
+            <include name="netty.jar"/>
+         </fileset>
+      </copy>
+   </target>
+
+   <target name="removeClient">
+      <echo>Removing JBoss Messaging client components</echo>
+      <delete file="${jboss_home}/client/jboss-messaging-client.jar"/>
+   </target>
+
+   <target  name="addClient">
+      <echo>Adding HornetQ client components</echo>
+      <copy todir="${jboss_home}/client">
+         <fileset dir="${lib.dir}">
+            <include name="hornetq-core-client.jar"/>
+            <include name="hornetq-jms-client.jar"/>
+            <include name="jbossws-hornetq.jar"/>
+         </fileset>
+      </copy>
+   </target>
+
+   <target name="removeConfig">
+      <property name="config" value="${CONFIG}"/>
+      <echo>Removing JBoss Messaging from config: ${config}</echo>
+      <delete dir="${jboss_home}/server/${config}/deploy/messaging"/>
+      <delete file="${jboss_home}/server/${config}/deployers/messaging-definitions-jboss-beans.xml"/>
+      <delete file="${jboss_home}/server/${config}/conf/props/messaging-roles.properties"/>
+      <delete file="${jboss_home}/server/${config}/conf/props/messaging-users.properties"/>
+      <delete file="${jboss_home}/server/${config}/deploy/jms-ra.rar"/>
+   </target>
+
+   <target name="createConfig">
+      <property name="config" value="${CONFIG}"/>
+      <property name="config_type" value="${CONFIG_TYPE}"/>
+      <echo>adding HornetQ components to ${config}</echo>
+      <copy todir="${jboss_home}/server/${config}/deployers/" file="${resources.dir}/ejb-deployer-jboss-beans.xml" overwrite="true"/>
+      <copy todir="${jboss_home}/server/${config}/conf/props/" file="${resources.dir}/hornetq-roles.properties" overwrite="true"/>
+      <copy todir="${jboss_home}/server/${config}/conf/props/" file="${resources.dir}/hornetq-users.properties" overwrite="true"/>
+      <copy todir="${jboss_home}/server/${config}/conf/" file="${resources.dir}/login-config.xml" overwrite="true"/>
+      <mkdir dir="${jboss_home}/server/${config}/deploy/hornetq"/>
+      <copy todir="${jboss_home}/server/${config}/deploy/hornetq" file="${resources.dir}/jboss-as-6/${config_type}/hornetq-configuration.xml" overwrite="true"/>
+      <copy todir="${jboss_home}/server/${config}/deploy/hornetq" file="${resources.dir}/jboss-as-6/${config_type}/hornetq-jboss-beans.xml" overwrite="true"/>
+      <copy todir="${jboss_home}/server/${config}/deploy/hornetq" file="${resources.dir}/jboss-as-6/${config_type}/hornetq-jms.xml" overwrite="true"/>
+      <copy todir="${jboss_home}/server/${config}/deploy/hornetq" file="${resources.dir}/jboss-as-6/${config_type}/jms-ds.xml" overwrite="true"/>
+      <copy todir="${jboss_home}/server/${config}/deployers/" file="${resources.dir}/hornetq-deployers-jboss-beans.xml" overwrite="true"/>
+      <mkdir dir="${jboss_home}/server/${config}/deploy/jms-ra.rar"/>
+      <mkdir dir="${jboss_home}/server/${config}/deploy/jms-ra.rar/META-INF"/>
+      <copy todir="${jboss_home}/server/${config}/deploy/jms-ra.rar/" file="${lib.dir}/hornetq-ra.jar" overwrite="true"/>
+      <copy todir="${jboss_home}/server/${config}/deploy/jms-ra.rar/META-INF" file="${resources.dir}/ra.xml" overwrite="true"/>
+      <copy todir="${jboss_home}/server/${config}/deploy/deployers/jbossws.deployer" file="${lib.dir}/jbossws-hornetq.jar" overwrite="true"/>
+   </target>
+</project>
\ No newline at end of file

Modified: branches/JBPAPP_5_1/hornetq-int/src/etc/switch.sh
===================================================================
--- branches/JBPAPP_5_1/hornetq-int/src/etc/switch.sh	2010-06-11 09:14:18 UTC (rev 105954)
+++ branches/JBPAPP_5_1/hornetq-int/src/etc/switch.sh	2010-06-11 09:39:19 UTC (rev 105955)
@@ -1,80 +1 @@
-#!/bin/sh
-### ====================================================================== ###
-##                                                                          ##
-##  This script will switch the default messaging provider to HornetQ       ##
-##                                                                          ##
-### ====================================================================== ###
-
-JBOSS_HOME=../../
-echo "Removing Common JBoss Messaging Components"
-rm $JBOSS_HOME/common/lib/jboss-messaging.jar
-rm $JBOSS_HOME/common/lib/jboss-messaging-int.jar
-
-echo "Adding HornetQ common components"
-
-cp lib/hornetq-bootstrap.jar $JBOSS_HOME/common/lib
-cp lib/hornetq-core.jar $JBOSS_HOME/common/lib
-cp lib/hornetq-jboss-as-integration.jar $JBOSS_HOME/common/lib
-cp lib/hornetq-jms.jar $JBOSS_HOME/common/lib
-cp lib/hornetq-logging.jar $JBOSS_HOME/common/lib
-cp lib/hornetq-int.jar $JBOSS_HOME/common/lib
-cp lib/netty.jar $JBOSS_HOME/common/lib
-
-echo "Removing JBoss Messaging client components"
-
-rm $JBOSS_HOME/client/jboss-messaging-client.jar
-
-echo "Adding HornetQ client components"
-
-cp lib/hornetq-core-client.jar $JBOSS_HOME/client
-cp lib/hornetq-jms-client.jar $JBOSS_HOME/client
-cp lib/jbossws-hornetq.jar $JBOSS_HOME/client
-create() {
-
-CONFIG_NAME=$1
-CONFIG=$2
-echo "Updating config" + $CONFIG_NAME
-
-echo "Removing JBoss Messaging"
-
-rm -r $JBOSS_HOME/server/$CONFIG_NAME/deploy/messaging
-rm $JBOSS_HOME/server/$CONFIG_NAME/deployers/messaging-definitions-jboss-beans.xml
-cp resources/ejb-deployer-jboss-beans.xml $JBOSS_HOME/server/$CONFIG_NAME/deployers/
-
-rm -r $JBOSS_HOME/server/$CONFIG_NAME/conf/props/messaging-roles.properties
-rm -r $JBOSS_HOME/server/$CONFIG_NAME/conf/props/messaging-users.properties
-
-cp resources/hornetq-roles.properties $JBOSS_HOME/server/$CONFIG_NAME/conf/props/
-cp resources/hornetq-users.properties $JBOSS_HOME/server/$CONFIG_NAME/conf/props/
-cp resources/login-config.xml $JBOSS_HOME/server/$CONFIG_NAME/conf/
-
-echo "Adding HornetQ and configuring for " + $CONFIG_NAME + " configuration"
-
-mkdir $JBOSS_HOME/server/$CONFIG_NAME/deploy/hornetq
-
-cp resources/jboss-as-6/$CONFIG/hornetq-configuration.xml $JBOSS_HOME/server/$CONFIG_NAME/deploy/hornetq
-cp resources/jboss-as-6/$CONFIG/hornetq-jboss-beans.xml $JBOSS_HOME/server/$CONFIG_NAME/deploy/hornetq
-cp resources/jboss-as-6/$CONFIG/hornetq-jms.xml $JBOSS_HOME/server/$CONFIG_NAME/deploy/hornetq
-cp resources/jboss-as-6/$CONFIG/jms-ds.xml $JBOSS_HOME/server/$CONFIG_NAME/deploy/hornetq
-cp resources/hornetq-deployers-jboss-beans.xml $JBOSS_HOME/server/$CONFIG_NAME/deployers
-
-echo "Removing Generic Resource Adaptor"
-
-rm $JBOSS_HOME/server/$CONFIG_NAME/deploy/jms-ra.rar
-
-mkdir $JBOSS_HOME/server/$CONFIG_NAME/deploy/jms-ra.rar
-mkdir $JBOSS_HOME/server/$CONFIG_NAME/deploy/jms-ra.rar/META-INF
-
-echo "Adding HornetQ Resource Adaptor"
-
-cp lib/hornetq-ra.jar $JBOSS_HOME/server/$CONFIG_NAME/deploy/jms-ra.rar/
-cp resources/ra.xml $JBOSS_HOME/server/$CONFIG_NAME/deploy/jms-ra.rar/META-INF
-
-echo "Updating JbossWS"
-
-cp lib/jbossws-hornetq.jar $JBOSS_HOME/server/$CONFIG_NAME/deployers/jbossws.deployer
-}
-create "default" "non-clustered"
-create "all" "clustered"
-create "standard" "non-clustered"
-
+ant
\ No newline at end of file



More information about the jboss-cvs-commits mailing list