riftsaw SVN: r1469 - trunk/distribution/src/main/release/install.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2011-11-04 05:55:01 -0400 (Fri, 04 Nov 2011)
New Revision: 1469
Added:
trunk/distribution/src/main/release/install/build.xml
Log:
SOA-3556 - uncomment uddi dependency when clustering and esb installed
Added: trunk/distribution/src/main/release/install/build.xml
===================================================================
--- trunk/distribution/src/main/release/install/build.xml (rev 0)
+++ trunk/distribution/src/main/release/install/build.xml 2011-11-04 09:55:01 UTC (rev 1469)
@@ -0,0 +1,357 @@
+<project name="BPEL_Installer" default="deploy" basedir=".">
+
+ <!-- Set deployment properties filename -->
+ <property name="org.jboss.soa.bpel.deployment.properties" location="deployment.properties"/>
+
+ <!-- Load Build Properties File -->
+ <property file="${org.jboss.soa.bpel.deployment.properties}"/>
+ <property file="../version.properties" />
+
+ <property name="server.dir" value="${org.jboss.as.home}/server/${org.jboss.as.config}"/>
+
+ <condition property="as.version" value="6" >
+ <available file="${server.dir}/deployers/weld.deployer"/>
+ </condition>
+
+ <condition property="as.version" value="5" >
+ <available file="${server.dir}/deployers"/>
+ </condition>
+
+ <property name="conf.dir" value="${server.dir}/conf"/>
+ <property name="deploy.dir" value="${server.dir}/deploy"/>
+ <property name="deployers.dir" value="${server.dir}/deployers"/>
+ <property name="server.lib.dir" value="${server.dir}/lib"/>
+ <property name="bpel-deployer" value="riftsaw-as${as.version}.deployer" />
+ <property name="bpel-runtime" value="riftsaw.sar" />
+ <property name="jbossesb-bpel-old" value="riftsaw.esb" />
+ <property name="jbossesb-bpel" value="riftsaw-esb.esb" />
+ <property name="bpel-esb-examples" value="esb" />
+ <property name="esb.examples.dir" value="${org.jboss.esb.home}/samples/quickstarts"/>
+
+ <!-- ws stack provider -->
+ <property name="ws.stack" value="native" />
+ <property name="ws.version" value="3.1.2.GA" />
+
+ <property name="ws.stack.distro.url" value="http://jboss.org/file-access/default/members/jbossws/downloads/jbossws-${..." />
+ <property name="ws.stack.dir" value="ws-stack"/>
+
+ <condition property="keep.ws.stack">
+ <and>
+ <equals arg1="${ws.stack}" arg2="native"/>
+ <equals arg1="${ws.version}" arg2="3.1.2.GA" />
+ </and>
+ </condition>
+
+ <condition property="clustering.support">
+ <equals arg1="${org.jboss.as.config}" arg2="all" />
+ </condition>
+
+ <condition property="is.as6">
+ <equals arg1="${as.version}" arg2="6" />
+ </condition>
+
+ <condition property="is.ws.stack.distro.available">
+ <available file="${ws.stack.dir}/jbossws-${ws.stack}-${ws.version}.zip" />
+ </condition>
+
+ <property name="modules" value="../modules" />
+ <property name="samples" value="../samples" />
+
+ <condition property="cache.provider" value="jbosscache">
+ <istrue value="${clustering.support}"/>
+ </condition>
+
+ <condition property="cache.provider" value="default">
+ <isfalse value="${clustering.support}" />
+ </condition>
+
+ <target name="check.deploy.props">
+ <condition property="as.configured">
+ <and>
+ <isset property="org.jboss.as.home"/>
+ <isset property="org.jboss.as.config"/>
+ <isset property="org.jboss.esb.home"/>
+ </and>
+ </condition>
+
+ <fail unless="as.configured" message="Cannot determine target deployment, please check deployment.properties"/>
+ </target>
+
+ <target name="deploy" description="Deploys BPEL Runtime to the server">
+
+ <antcall target="internal.install.riftsaw.ws.stack"/>
+
+ <echo message="Deploy BPEL runtime to JBoss server" />
+ <copy todir="${deployers.dir}/${bpel-deployer}">
+ <fileset dir="${modules}/${bpel-deployer}" />
+ </copy>
+ <copy todir="${deploy.dir}/${bpel-runtime}">
+ <fileset dir="${modules}/${bpel-runtime}" />
+ </copy>
+
+ <copy todir="${deploy.dir}/${jbossesb-bpel}">
+ <fileset dir="${modules}/${jbossesb-bpel}" />
+ </copy>
+
+ <!-- copy appropriate jboss-beans.xml, bpel.properties, datasource etc into server -->
+ <copy file="../conf/jboss/jboss-beans.xml"
+ toFile="${deploy.dir}/${bpel-runtime}/META-INF/jboss-beans.xml"
+ overwrite="true">
+ <filterset>
+ <filter token="database" value="${database}"/>
+ <filterset filtersfile="../conf/jboss/as${as.version}.properties" />
+ </filterset>
+ </copy>
+
+ <copy file="../conf/bpel.properties"
+ toFile="${deploy.dir}/${bpel-runtime}/bpel.properties"
+ overwrite="true">
+ <filterset filtersfile="../conf/jdbc/${database}.properties" />
+ <filterset filtersfile="../conf/wsstack/${ws.stack}.properties" />
+ <filterset filtersfile="../conf/cache/${cache.provider}.properties" />
+ <filterset filtersfile="../conf/jboss/as${as.version}.properties" />
+ </copy>
+
+ <copy file="../conf/datasource/bpel-${database}-ds.xml"
+ toFile="${deploy.dir}/${bpel-runtime}/META-INF/bpel-ds.xml"
+ overwrite="true">
+ <filterset filtersfile="../conf/jdbc/${database}.properties" />
+ </copy>
+
+ <!--install appropriate db driver-->
+ <antcall target="internal.install.riftsaw.into.jboss.db.${database}" />
+
+ <!-- BPM Console -->
+
+ <mkdir dir="${deploy.dir}/bpel-console"/>
+ <mkdir dir="${deploy.dir}/bpel-console/bpel-identity.sar"/>
+ <mkdir dir="${deploy.dir}/bpel-console/gwt-console-server.war"/>
+ <mkdir dir="${deploy.dir}/bpel-console/gwt-console.war" />
+
+ <copy todir="${deploy.dir}/bpel-console/bpel2svg">
+ <fileset dir="${modules}/bpel-console/bpel2svg"/>
+ </copy>
+
+ <copy file="${modules}/bpel-console/riftsaw-console-bpaf.jar" todir="${deploy.dir}/bpel-console"/>
+ <copy file="${modules}/bpel-console/activity-monitor-model.jar" todir="${deploy.dir}/bpel-console"/>
+
+ <copy file="${modules}/bpel-console/riftsaw-console-integration.jar" todir="${deploy.dir}/bpel-console"/>
+ <copy file="${modules}/bpel-console/jettison.jar" todir="${deploy.dir}/bpel-console"/>
+ <unzip src="${modules}/bpel-console/riftsaw-console-identity.jar" dest="${deploy.dir}/bpel-console/bpel-identity.sar"/>
+ <unzip src="${modules}/bpel-console/gwt-console.war" dest="${deploy.dir}/bpel-console/gwt-console.war"/>
+ <unzip src="${modules}/bpel-console/gwt-console-server.war" dest="${deploy.dir}/bpel-console/gwt-console-server.war"/>
+
+ <antcall target="remove.redundant.jaxrs" />
+
+ <copy file="${modules}/bpel-console/gwt-console-server-integration.jar" todir="${server.lib.dir}"/>
+ <copy file="${modules}/bpel-console/gwt-console-rpc.jar" todir="${server.lib.dir}"/>
+
+ <antcall target="deploy-clustering" />
+
+ <antcall target="deploy.esb.uddi.config"/>
+
+ <antcall target="remove.redundant.juddi" />
+
+ </target>
+
+ <target name="undeploy" description="Undeploys BPEL Runtime">
+ <echo message="Undeploy the BPEL runtime from JBoss ESB server" />
+ <delete dir="${deployers.dir}/${bpel-deployer}" />
+ <delete dir="${deploy.dir}/${bpel-runtime}" />
+ <delete dir="${deploy.dir}/${jbossesb-bpel}" />
+ <delete dir="${deploy.dir}/${jbossesb-bpel-old}" /> <!-- Name changed due to error in AS6 -->
+
+ <!--uninstall appropriate db driver-->
+ <antcall target="internal.uninstall.riftsaw.into.jboss.db.${database}" />
+ <antcall target="undeploy.esb.uddi.config"/>
+
+ <delete dir="${deploy.dir}/bpel-console" />
+ <delete file="${server.lib.dir}/gwt-console-server-integration.jar"/>
+ <delete file="${server.lib.dir}/gwt-console-rpc.jar"/>
+
+ <antcall target="undeploy-clustering" />
+ </target>
+
+
+ <!-- install database specific driver -->
+ <target name="internal.install.riftsaw.into.jboss.db.hsql">
+ <copy todir="${server.lib.dir}" overwrite="true">
+ <fileset dir="../conf/drivers">
+ <include name="h2*.jar" />
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="internal.install.riftsaw.into.jboss.db.mysql">
+ <copy todir="${deploy.dir}/${bpel-runtime}/lib" overwrite="true">
+ <fileset dir="../conf/drivers">
+ <include name="mysql-connector-java*.jar"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="internal.install.riftsaw.into.jboss.db.sqlserver">
+ <copy todir="${deploy.dir}/${bpel-runtime}/lib" overwrite="true">
+ <fileset dir="../conf/drivers">
+ <include name="jtds-*.jar"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="internal.install.riftsaw.into.jboss.db.postgres">
+ <copy todir="${deploy.dir}/${bpel-runtime}/lib" overwrite="true">
+ <fileset dir="../conf/drivers">
+ <include name="postgresql-*.jar"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="internal.install.riftsaw.into.jboss.db.oracle">
+ <available file="../conf/drivers/ojdbc14.jar" property="oracle.driver.jar.available" />
+ <fail message="please download the oracle driver jar ojdbc14.jar from oracle and put it in the conf/drivers directory" unless="oracle.driver.jar.available" />
+ <copy file="../conf/drivers/ojdbc14.jar"
+ todir="${deploy.dir}/${bpel-runtime}/lib" />
+ </target>
+
+ <target name="internal.install.riftsaw.into.jboss.db.db2">
+ <available file="../conf/drivers/db2jcc.jar" property="db2.driver.jar.available" />
+ <fail message="please download the db2 driver jar, rename it to db2jcc.jar and put it in the conf/drivers directory" unless="db2.driver.jar.available" />
+ <copy file="../conf/drivers/db2jcc.jar"
+ todir="${deploy.dir}/${bpel-runtime}/lib" />
+ </target>
+
+ <target name="internal.install.riftsaw.into.jboss.db.sybase" />
+
+ <!-- uninstall database specific driver -->
+ <target name="internal.uninstall.riftsaw.into.jboss.db.hsql" />
+
+ <target name="internal.uninstall.riftsaw.into.jboss.db.mysql" />
+
+ <target name="internal.uninstall.riftsaw.into.jboss.db.sqlserver" />
+
+ <target name="internal.uninstall.riftsaw.into.jboss.db.postgres" />
+
+ <target name="internal.uninstall.riftsaw.into.jboss.db.oracle"/>
+
+ <target name="internal.uninstall.riftsaw.into.jboss.db.db2" />
+
+ <target name="internal.uninstall.riftsaw.into.jboss.db.sybase" />
+
+ <target name="internal.install.riftsaw.ws.stack" unless="keep.ws.stack">
+ <echo>Replacing the Web Service Stack to ${ws.stack}-${ws.version}</echo>
+ <antcall target="get.ws.stack" />
+ <unzip src="${ws.stack.dir}/jbossws-${ws.stack}-${ws.version}.zip" dest="${basedir}/ws-stack/dist/" />
+ <copy file="ws-stack/dist/jbossws-${ws.stack}-bin-dist/ant.properties.example" tofile="ws-stack/dist/jbossws-${ws.stack}-bin-dist/ant.properties" />
+ <ant dir="${basedir}/ws-stack/dist/jbossws-${ws.stack}-bin-dist" target="deploy-jboss510">
+ <property name="jboss510.home" value="${org.jboss.as.home}" />
+ <property name="jboss.server.instance" value="${org.jboss.as.config}" />
+ </ant>
+ </target>
+
+ <target name="get.ws.stack" description="download ws stack" unless="is.ws.stack.distro.available">
+ <mkdir dir="${ws.stack.dir}" />
+ <get src="${ws.stack.distro.url}" dest="${ws.stack.dir}/jbossws-${ws.stack}-${ws.version}.zip" />
+ </target>
+
+ <!-- deploy clustering specific libraries and configurations-->
+ <target name="deploy-clustering" if="clustering.support">
+ <copy file="../modules/clustering/META-INF/jboss-beans.xml"
+ toFile="${deploy.dir}/${bpel-runtime}/META-INF/jboss-beans.xml"
+ overwrite="true">
+ <filterset>
+ <filter token="database" value="${database}"/>
+ <filterset filtersfile="../conf/jboss/as${as.version}.properties" />
+ </filterset>
+ </copy>
+ <copy todir="${deploy.dir}/${bpel-runtime}/lib" overwrite="true">
+ <fileset dir="../modules/clustering">
+ <include name="riftsaw-clustering-*.jar"/>
+ </fileset>
+ </copy>
+
+ <move file="${deploy.dir}/cluster/jboss-cache-manager.sar/META-INF/jboss-cache-manager-jboss-beans.xml"
+ toFile="${deploy.dir}/cluster/jboss-cache-manager.sar/META-INF/jboss-cache-manager-jboss-beans.xml.old" >
+ </move>
+
+ <copy file="../modules/clustering/META-INF/riftsaw-cache-manager-jboss-beans.xml"
+ toFile="${deploy.dir}/cluster/jboss-cache-manager.sar/META-INF/jboss-cache-manager-jboss-beans.xml"
+ overwrite="true">
+ </copy>
+
+
+ </target>
+
+ <!-- undeploy clustering specific configuration.-->
+ <target name="undeploy-clustering" if="clustering.support">
+ <move file="${deploy.dir}/cluster/jboss-cache-manager.sar/META-INF/jboss-cache-manager-jboss-beans.xml.old"
+ toFile="${deploy.dir}/cluster/jboss-cache-manager.sar/META-INF/jboss-cache-manager-jboss-beans.xml" overwrite="true">
+ </move>
+ </target>
+
+
+ <target name="remove.redundant.jaxrs" if="is.as6" >
+ <delete file="${deploy.dir}/bpel-console/gwt-console-server.war/WEB-INF/lib/jaxrs-api-1.0.2.GA.jar"/>
+ </target>
+
+
+ <target name="check.juddi">
+ <condition property="is.juddi.duplicated">
+ <available file="${deploy.dir}/juddi-service.sar" />
+ </condition>
+ </target>
+
+ <target name="remove.redundant.juddi" if="is.juddi.duplicated" depends="check.juddi">
+ <!-- JBoss WS install additional juddi, duplicated with JBossESB's juddi one, or in cluster environment -->
+ <echo> deleting the duplicated juddi service</echo>
+ <delete dir="${deploy.dir}/juddi-service.sar"/>
+ </target>
+
+ <target name="check.jbossesb-registry">
+ <condition property="is.jbossesb-registry">
+ <available file="${deploy.dir}/jbossesb-registry.sar" />
+ </condition>
+ <condition property="isNot.jbossesb-registry">
+ <isfalse value="${is.jbossesb-registry}"/>
+ </condition>
+ </target>
+
+ <target name="check.esb.juddi.client.xml.old" if="is.jbossesb-registry" depends="check.jbossesb-registry">
+ <condition property="is.renamedToOld">
+ <available file="${deploy.dir}/jbossesb-registry.sar/esb.juddi.client.xml.old" />
+ </condition>
+ <condition property="isNot.renamedToOld">
+ <isfalse value="${is.renamedToOld}"/>
+ </condition>
+ </target>
+
+ <target name="deploy.esb.uddi.config" if="is.jbossesb-registry" depends="check.jbossesb-registry">
+ <echo>deploy jUDDI configuration</echo>
+
+ <copy file="../conf/juddi/riftsaw_Publisher.xml"
+ todir="${deploy.dir}/jbossesb-registry.sar/juddi_custom_install_data/" overwrite="true"/>
+ <copy file="../conf/juddi/riftsaw_tModels.xml"
+ todir="${deploy.dir}/jbossesb-registry.sar/juddi_custom_install_data/" overwrite="true"/>
+ <copy file="../conf/juddi/riftsaw_BusinessEntity.xml"
+ todir="${deploy.dir}/jbossesb-registry.sar/juddi_custom_install_data/" overwrite="true" />
+ <copy file="../conf/juddi/riftsaw.uddi.xml"
+ todir="${deploy.dir}/riftsaw.sar/META-INF/" overwrite="true" />
+ <replace file="${deploy.dir}/riftsaw.sar/bpel.properties"
+ token="bpel.uddi.registration=false"
+ value="bpel.uddi.registration=true"/>
+ <replace file="${deploy.dir}/riftsaw.sar/bpel.properties"
+ token="bpel.uddi.lookup=false"
+ value="bpel.uddi.lookup=true"/>
+ <replace file="${deploy.dir}/riftsaw.sar/META-INF/jboss-beans.xml"
+ token="<!--<depends>jboss.esb:service=JuddiClient</depends>-->"
+ value="<depends>jboss.esb:service=JuddiClient</depends>"/>
+
+ </target>
+
+ <target name="undeploy.esb.uddi.config" if="is.jbossesb-registry" depends="check.jbossesb-registry">
+ <echo>undeploy jUDDI configuration</echo>
+ <delete file="${deploy.dir}/jbossesb-registry.sar/juddi_custom_install_data/riftsaw_Publisher.xml" />
+ <delete file="${deploy.dir}/jbossesb-registry.sar/juddi_custom_install_data/riftsaw_BusinessEntity.xml" />
+ <delete file="${deploy.dir}/jbossesb-registry.sar/juddi_custom_install_data/riftsaw_tModels.xml" />
+ </target>
+
+</project>