[jboss-svn-commits] JBL Code SVN: r14416 - in labs/jbossesb/trunk/product: install and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Aug 21 07:30:22 EDT 2007
Author: kevin.conner at jboss.com
Date: 2007-08-21 07:30:22 -0400 (Tue, 21 Aug 2007)
New Revision: 14416
Added:
labs/jbossesb/trunk/product/install/bindings.xslt
Modified:
labs/jbossesb/trunk/product/build-distr.xml
labs/jbossesb/trunk/product/install/build.xml
Log:
Added configuration of sample-bindings.xml: JBESB-848
Modified: labs/jbossesb/trunk/product/build-distr.xml
===================================================================
--- labs/jbossesb/trunk/product/build-distr.xml 2007-08-21 11:21:59 UTC (rev 14415)
+++ labs/jbossesb/trunk/product/build-distr.xml 2007-08-21 11:30:22 UTC (rev 14416)
@@ -88,6 +88,12 @@
<fileset dir="${services.dir}/soap/build" includes="soap.esb/**/*"/>
<fileset dir="build/jbossesb/lib" includes="soapui-client.sar/**/*"/>
</copy>
+
+ <!-- initialise the ESB bindings -->
+ <ant dir="install" target="deploy.bindings" inheritAll="false">
+ <property name="org.jboss.esb.server.home" value="${esbserver.dist.dir}"/>
+ <property name="org.jboss.esb.server.config" value="default"/>
+ </ant>
</target>
<target name="unpack.server.zip" unless="skip.server.esb">
Added: labs/jbossesb/trunk/product/install/bindings.xslt
===================================================================
--- labs/jbossesb/trunk/product/install/bindings.xslt (rev 0)
+++ labs/jbossesb/trunk/product/install/bindings.xslt 2007-08-21 11:30:22 UTC (rev 14416)
@@ -0,0 +1,41 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
+
+ <xsl:template match="server[@name='ports-default']">
+ <xsl:call-template name="process-server">
+ <xsl:with-param name="serverName" select="@name"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="server[@name='ports-01']">
+ <xsl:call-template name="process-server">
+ <xsl:with-param name="serverName" select="@name"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="server[@name='ports-02']">
+ <xsl:call-template name="process-server">
+ <xsl:with-param name="serverName" select="@name"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="server[@name='ports-03']">
+ <xsl:call-template name="process-server">
+ <xsl:with-param name="serverName" select="@name"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template name="process-server">
+ <xsl:param name="serverName"/>
+
+ <xsl:copy xml:space="preserve"><xsl:apply-templates select="@*|node()"/>
+ <xsl:comment> ************ ESB configuration for server <xsl:value-of select="$serverName"/> ************ </xsl:comment><xsl:text>
+ </xsl:text></xsl:copy>
+ </xsl:template>
+
+ <xsl:template name="identity" match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+ </xsl:template>
+</xsl:stylesheet>
Modified: labs/jbossesb/trunk/product/install/build.xml
===================================================================
--- labs/jbossesb/trunk/product/install/build.xml 2007-08-21 11:21:59 UTC (rev 14415)
+++ labs/jbossesb/trunk/product/install/build.xml 2007-08-21 11:30:22 UTC (rev 14416)
@@ -46,7 +46,7 @@
<target name="dependencies" depends="dependencies.source, dependencies.jbossesb"/>
- <target name="deploy" depends="internal.deploy" description="Wrapper for internal.deploy"/>
+ <target name="deploy" depends="internal.deploy, deploy.bindings" description="Wrapper for internal.deploy"/>
<target name="check.tomcat.props">
<fail unless="org.jboss.esb.tomcat.home" message="Cannot determine target deployment, please check deployment.properties"/>
@@ -142,7 +142,7 @@
</copy>
</target>
- <target name="undeploy" depends="check.deploy.props" description="Undeploy ESB components.">
+ <target name="undeploy" depends="check.deploy.props, undeploy.bindings" description="Undeploy ESB components.">
<delete dir="${deploy.dir}/jbossesb.sar" />
<delete dir="${deploy.dir}/jbossesb.esb" />
<delete dir="${deploy.dir}/jbpm.esb" />
@@ -239,4 +239,22 @@
<xslt style="jaxb.xslt" in="${jbossws.beans.location}" out="${jbossws.beans.tmp.location}"/>
<move file="${jbossws.beans.tmp.location}" tofile="${jbossws.beans.location}"/>
</target>
+
+ <target name="init.bindings.props" depends="check.deploy.props, dependencies">
+ <property name="bindings.dir" location="${org.jboss.esb.server.home}/docs/examples/binding-manager"/>
+ <property name="bindings.location" location="${bindings.dir}/sample-bindings.xml"/>
+ <property name="bindings.tmp.location" location="${bindings.location}.tmp"/>
+ <property name="bindings.backup.location" location="${bindings.location}.bak"/>
+ <available property="bindings.exist" file="${bindings.backup.location}" type="file"/>
+ </target>
+
+ <target name="deploy.bindings" depends="init.bindings.props" unless="bindings.exist" description="Deploys ESB Bindings into the application server">
+ <xslt style="bindings.xslt" in="${bindings.location}" out="${bindings.tmp.location}"/>
+ <move file="${bindings.location}" tofile="${bindings.backup.location}"/>
+ <move file="${bindings.tmp.location}" tofile="${bindings.location}"/>
+ </target>
+
+ <target name="undeploy.bindings" depends="init.bindings.props" if="bindings.exist" description="Undeploy ESB Bindings from the application server">
+ <move file="${bindings.backup.location}" tofile="${bindings.location}"/>
+ </target>
</project>
More information about the jboss-svn-commits
mailing list