[jboss-svn-commits] JBL Code SVN: r12371 - in labs/jbossesb/trunk/product/samples/quickstarts: conf and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Jun 7 05:53:59 EDT 2007
Author: kevin.conner at jboss.com
Date: 2007-06-07 05:53:59 -0400 (Thu, 07 Jun 2007)
New Revision: 12371
Modified:
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration1/build.xml
labs/jbossesb/trunk/product/samples/quickstarts/conf/base-build.xml
Log:
Reordered and commented base build.xml
Modified: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration1/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration1/build.xml 2007-06-07 09:32:17 UTC (rev 12370)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration1/build.xml 2007-06-07 09:53:59 UTC (rev 12371)
@@ -5,6 +5,8 @@
${line.separator}
</description>
+ <property name="deploy.exploded" value="true"/>
+
<!-- Import the base Ant build script... -->
<import file="../conf/base-build.xml"/>
@@ -33,16 +35,6 @@
<echo message="This target is not implemented for this quickstart. Please run 'ant deploy' and the 'ant runtest'"/>
</target>
- <target name="deploy-esb-archive-before"/>
- <target name="deploy-esb-archive-after"/>
-
- <target name="quickstart-specific-deploys">
- <property name="dest" location="${org.jboss.esb.server.deploy.dir}/${ant.project.name}.esb"/>
- <delete quiet="true" dir="${dest}"/>
- <mkdir dir="${dest}"/>
- <unjar src="${build.dir}/${ant.project.name}.esb" dest="${dest}"/>
- </target>
-
<target name="refreshProcess" description="Moves the changed process definition to the server without restarting all the services">
<echo>Moves the changed process definition to the server without restarting all the services</echo>
<copy overwrite="true"
Modified: labs/jbossesb/trunk/product/samples/quickstarts/conf/base-build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/conf/base-build.xml 2007-06-07 09:32:17 UTC (rev 12370)
+++ labs/jbossesb/trunk/product/samples/quickstarts/conf/base-build.xml 2007-06-07 09:53:59 UTC (rev 12371)
@@ -2,14 +2,21 @@
<!-- get the name of the directory where this file exists -->
<dirname property="pwd" file="${ant.file.base-build}"/>
- <dirname property="quickstarts.dir" file="${pwd}/"/>
- <dirname property="product.dir" file="${quickstarts.dir}/.."/>
+ <property name="quickstarts.dir" location="${pwd}/.."/>
+ <property name="product.dir" location="${quickstarts.dir}/../.."/>
+ <!-- load quickstart specific properties -->
<property file="${pwd}/quickstarts.properties" prefix="quickstart" />
<property name="build.dir" value="${basedir}/build" />
<property name="classes" value="${build.dir}/classes" />
+<!-- ==================================================================== -->
+<!-- This section handles the discovery of the distribution hierarchy. -->
+<!-- There should be no need to change this section unless the hierarchy -->
+<!-- structure changes. -->
+<!-- ==================================================================== -->
+
<!-- Are we embedded in a source hierarchy? -->
<condition property="hierarchy.source">
<available file="${product.dir}/build-distr.xml"/>
@@ -38,6 +45,7 @@
</or>
</condition>
+ <!-- Do we have a recognised hierarchy? -->
<condition property="build.recognised">
<or>
<isset property="build.jbossesb"/>
@@ -47,12 +55,85 @@
<fail unless="build.recognised" message="Cannot determine build hierarchy"/>
+ <!-- Check for jbossesb if we are running in source hierarchy -->
<target name="check-jbossesb-dist" if="hierarchy.source">
<available file="${product.dir}/build/jbossesb" property="dist.exists"/>
<fail unless="dist.exists"
message="JBossESB must be built. Please run 'ant dist' in ${product.dir}"/>
</target>
+<!-- ==================================================================== -->
+<!-- This section handles the discovery of the messaging platform. -->
+<!-- ==================================================================== -->
+
+ <target name="messaging-config">
+ <property name="org.jboss.esb.server.deploy.dir"
+ value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/deploy"/>
+
+ <condition property="messaging.present">
+ <available file="${org.jboss.esb.server.deploy.dir}/jboss-messaging"/>
+ </condition>
+ <condition property="messaging.present">
+ <available file="${org.jboss.esb.server.deploy.dir}/jboss-messaging.sar"/>
+ </condition>
+
+ <condition property="messaging.scoped.present">
+ <available file="${org.jboss.esb.server.deploy.dir}/jboss-messaging/META-INF/jboss-service.xml"/>
+ </condition>
+ <condition property="messaging.scoped.present">
+ <available file="${org.jboss.esb.server.deploy.dir}/jboss-messaging.sar/META-INF/jboss-service.xml"/>
+ </condition>
+
+ <condition property="jbossmq.present">
+ <not>
+ <isset property="messaging.present"/>
+ </not>
+ </condition>
+ </target>
+
+ <!-- dependencies specific to JBoss Messaging -->
+ <target name="messaging-dependencies" if="messaging.present">
+ <property name="jms.service.file" value="jbm-queue-service.xml"/>
+ <property name="jms.description" value="JBoss Messaging"/>
+ </target>
+
+ <!-- dependencies specific to JBoss Messaging in a scoped environment -->
+ <target name="messaging-scoped-dependencies" if="messaging.scoped.present">
+ <fail message="Scoped JBoss Messaging not yet supported"/>
+ <property name="jms.service.file" value=""/>
+ <property name="jms.description" value="JBoss Messaging (scoped)"/>
+ </target>
+
+ <!-- dependencies specific to JBoss MQ -->
+ <target name="jbossmq-dependencies" if="jbossmq.present">
+ <property name="jms.service.file" value="jbmq-queue-service.xml"/>
+ <property name="jms.description" value="JBoss MQ"/>
+ </target>
+
+<!-- ==================================================================== -->
+<!-- This section discovers quickstart specific libraries. -->
+<!-- ==================================================================== -->
+
+ <available property="quickstart.lib.exists" file="${basedir}/lib"/>
+
+ <target name="qslib-dependencies" if="quickstart.lib.exists">
+ <path id="quickstart-lib-classpath">
+ <fileset dir="${basedir}/lib" includes="*.jar" /> <!-- Quickstart Specific Jars. -->
+ </path>
+ </target>
+
+ <target name="non-qslib-dependencies" unless="quickstart.lib.exists">
+ <path id="quickstart-lib-classpath"/>
+ </target>
+
+<!-- ==================================================================== -->
+<!-- This section handles dependencies specific to each distribution. -->
+<!-- It configures the following properties -->
+<!-- org.jboss.esb.server.config, org.jboss.esb.server.home and -->
+<!-- deployment-classpath -->
+<!-- ==================================================================== -->
+
+ <!-- Configure dependencies for jbossesb and source distributions -->
<target name="jbossesb-dependencies" if="build.jbossesb">
<condition property="base.jbossesb"
value="${product.dir}/build/jbossesb"
@@ -67,6 +148,7 @@
<isset property="quickstart.org.jboss.esb.server.config"/>
</condition>
+ <!-- check for installation deployment.properties -->
<property name="install.dir" value="${product.dir}/install"/>
<property file="${install.dir}/deployment.properties" prefix="install" />
<condition
@@ -91,6 +173,7 @@
</path>
</target>
+ <!-- Configure dependencies for jbossesb-server distribution -->
<target name="jbossesb-server-dependencies" if="hierarchy.jbossesb-server">
<property name="org.jboss.esb.server.home" value="${product.dir}"/>
<property name="org.jboss.esb.server.config" value="default"/>
@@ -110,66 +193,12 @@
</path>
</target>
- <property name="additional.deploys" value="none" />
+<!-- ==================================================================== -->
+<!-- This section handles common dependencies. -->
+<!-- It configures the following properties -->
+<!-- compile-classpath, exec-classpath -->
+<!-- ==================================================================== -->
- <available property="quickstart.lib.exists" file="${basedir}/lib"/>
-
- <property name="deploy-after" value="true" />
-
- <path id="quickstart-dependencies-classpath"/>
-
- <target name="qslib-dependencies" if="quickstart.lib.exists">
- <path id="quickstart-lib-classpath">
- <fileset dir="${basedir}/lib" includes="*.jar" /> <!-- Quickstart Specific Jars. -->
- </path>
- </target>
-
- <target name="non-qslib-dependencies" unless="quickstart.lib.exists">
- <path id="quickstart-lib-classpath"/>
- </target>
-
- <target name="messaging-config">
- <property name="org.jboss.esb.server.deploy.dir"
- value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/deploy"/>
-
- <condition property="messaging.present">
- <available file="${org.jboss.esb.server.deploy.dir}/jboss-messaging"/>
- </condition>
- <condition property="messaging.present">
- <available file="${org.jboss.esb.server.deploy.dir}/jboss-messaging.sar"/>
- </condition>
-
- <condition property="messaging.scoped.present">
- <available file="${org.jboss.esb.server.deploy.dir}/jboss-messaging/META-INF/jboss-service.xml"/>
- </condition>
- <condition property="messaging.scoped.present">
- <available file="${org.jboss.esb.server.deploy.dir}/jboss-messaging.sar/META-INF/jboss-service.xml"/>
- </condition>
-
- <condition property="jbossmq.present">
- <not>
- <isset property="messaging.present"/>
- </not>
- </condition>
- </target>
-
- <target name="messaging-dependencies" if="messaging.present">
- <property name="jms.service.file" value="jbm-queue-service.xml"/>
- <property name="jms.description" value="JBoss Messaging"/>
- </target>
-
- <target name="messaging-scoped-dependencies" if="messaging.scoped.present">
-
- <fail message="Scoped JBoss Messaging not yet supported"/>
- <property name="jms.service.file" value=""/>
- <property name="jms.description" value="JBoss Messaging (scoped)"/>
- </target>
-
- <target name="jbossmq-dependencies" if="jbossmq.present">
- <property name="jms.service.file" value="jbmq-queue-service.xml"/>
- <property name="jms.description" value="JBoss MQ"/>
- </target>
-
<target name="dependencies" depends="check-jbossesb-dist, qslib-dependencies, non-qslib-dependencies, jbossesb-dependencies, jbossesb-server-dependencies, messaging-config, messaging-dependencies, messaging-scoped-dependencies, jbossmq-dependencies, quickstart-specific-dependencies">
<path id="compile-classpath">
@@ -191,6 +220,13 @@
</path>
</target>
+<!-- ==================================================================== -->
+<!-- This section defines the following public targets. -->
+<!-- compile, run, deploy jar, package-deployment, undeploy, -->
+<!-- deploy-jms-dests, undeploy-jms-dests, echoCP, echoPaths, clean, -->
+<!-- help-quickstarts, help -->
+<!-- ==================================================================== -->
+
<target name="compile" depends="dependencies">
<mkdir dir="${classes}" />
<javac srcdir="${basedir}/src" destdir="${classes}" debug="true">
@@ -198,8 +234,6 @@
</javac>
</target>
- <target name="config"/>
-
<target name="run" depends="compile,config">
<description> run will run the quickstart in standalone mode
</description>
@@ -210,22 +244,6 @@
</java>
</target>
- <target name="deployToSAR">
- <echo message='******************' />
- <echo message='DEPRECATED!! Sorry, this target has been deprecated for Quickstart Deployment.' />
- <echo message='Run "ant deploy" to deploy this Quickstart to your target JBoss ESB Server.${line.separator}${line.separator}' />
- <echo message='******************' />
- <fail />
- </target>
-
- <target name="deploy-messaging" unless="messaging.scoped.present">
- <copy file="${jms.service.file}" overwrite="true" tofile="${org.jboss.esb.server.deploy.dir}/${ant.project.name}-queue-service.xml" failonerror="false"/>
- </target>
-
- <target name="undeploy-messaging">
- <delete file="${org.jboss.esb.server.deploy.dir}/${ant.project.name}-queue-service.xml" quiet="true"/>
- </target>
-
<target name="deploy" depends="compile, config">
<description>deploy will deploy the Quickstart .esb archive to JBoss ESB Server
</description>
@@ -241,22 +259,31 @@
<antcall target="package-deployment" />
- <antcall target="deploy-esb-archive-before" />
+ <condition property="deploy.exploded.requested">
+ <equals arg1="${deploy.exploded}" arg2="true" casesensitive="false"/>
+ </condition>
+
+ <antcall target="deploy-esb"/>
+ <antcall target="deploy-exploded-esb"/>
+
<antcall target="quickstart-specific-deploys" />
- <antcall target="deploy-esb-archive-after" />
<antcall target="display-instructions" />
</target>
- <target name="display-instructions">
- <echo message='${line.separator}******************' />
- <echo>Quickstart deployed to target JBoss ESB/App Server at '${org.jboss.esb.server.deploy.dir}'.</echo>
- <echo>1. Check your ESB Server console to make sure the deployment was executed without errors.</echo>
- <echo>2. Run 'ant runtest' to run the Quickstart.</echo>
- <echo>3. Check your ESB Server console again. The Quickstart should have produced some output.</echo>
- <echo message='******************' />
+ <target name="deploy-esb" unless="deploy.exploded.requested">
+ <copy todir="${org.jboss.esb.server.deploy.dir}"
+ file="${build.dir}/${ant.project.name}.esb"/>
</target>
+ <target name="deploy-exploded-esb" if="deploy.exploded.requested">
+ <property name="dest" location="${org.jboss.esb.server.deploy.dir}/${ant.project.name}.esb"/>
+ <delete quiet="true" file="${dest}"/>
+ <delete quiet="true" dir="${dest}"/>
+ <mkdir dir="${dest}"/>
+ <unjar src="${build.dir}/${ant.project.name}.esb" dest="${dest}"/>
+ </target>
+
<target name="jar" depends="compile">
<jar destfile="${build.dir}/${ant.project.name}.jar">
<fileset dir="${build.dir}/classes"/>
@@ -291,54 +318,6 @@
<antcall target="quickstart-specific-undeploys" />
</target>
- <!-- Override this target in the Quickstart in order to make Quickstart specific dependencies. -->
- <target name="quickstart-specific-dependencies"/>
-
- <target name="quickstart-specific-assemblies">
- <!-- Override this target in the Quickstart in order to make Quickstart specific assemblies. -->
- <echo message="No Quickstart specific assembly tasks." />
- </target>
-
- <target name="quickstart-specific-deploys">
- <!-- Override this target in the Quickstart in order to make Quickstart specific deployments. -->
- <echo message="No Quickstart specific deployments being made." />
- </target>
-
- <target name="quickstart-specific-undeploys">
- <!-- Override this target in the Quickstart in order to make Quickstart specific undeployments. -->
- <echo message="No Quickstart specific undeployments being made." />
- </target>
-
- <target name="assert-ws-available">
- <available property="ws-available" file="${org.jboss.esb.server.deploy.dir}/jbossws.sar" type="dir" />
- <fail unless="ws-available">**** DEPLOYMENT FAILED... Sorry, this Quickstart requires a JBoss Webservice container. '${org.jboss.esb.server.home}' does not have a Webservice container. Check the 'org.jboss.esb.server.home' property in ../quickstarts.properties"</fail>
- <echo message="JBoss Webservice container found on target '${org.jboss.esb.server.deploy.dir}'." />
- </target>
-
- <target name="assert-ejb3-available">
- <available property="ejb3-available" file="${org.jboss.esb.server.deploy.dir}/ejb3.deployer" type="dir" />
- <fail unless="ejb3-available">**** DEPLOYMENT FAILED... Sorry, this Quickstart requires a JBoss EJB3 container. '${org.jboss.esb.server.home}' does not have an EJB3 container. Check the 'org.jboss.esb.server.home' property in ../quickstarts.properties"</fail>
- <echo message="JBoss EJB3 container found on target '${org.jboss.esb.server.deploy.dir}'." />
- </target>
-
- <target name="deploy-esb-archive-before" unless="deploy-after">
- <!--copy file="${build.dir}/${ant.project.name}.esb" overwrite="true" todir="${org.jboss.esb.server.deploy.dir}" /-->
- <copy todir="${org.jboss.esb.server.deploy.dir}">
- <fileset dir="${build.dir}">
- <include name="${ant.project.name}.esb"/>
- </fileset>
- </copy>
- </target>
-
- <target name="deploy-esb-archive-after" if="deploy-after">
- <!--copy file="${build.dir}/${ant.project.name}.esb" overwrite="true" todir="${org.jboss.esb.server.deploy.dir}" /-->
- <copy todir="${org.jboss.esb.server.deploy.dir}">
- <fileset dir="${build.dir}">
- <include name="${ant.project.name}.esb"/>
- </fileset>
- </copy>
- </target>
-
<target name="deploy-jms-dests" depends="dependencies, deploy-messaging">
<description>deploy-jms-dests will deploy the jms destinations for application server
</description>
@@ -382,11 +361,6 @@
</delete>
</target>
- <target name="quickstart-specific-clean">
- <!-- Override this target in the Quickstart in order to make Quickstart specific cleans. -->
- <echo message="No Quickstart specific 'clean' being made." />
- </target>
-
<target name="help-quickstarts">
<description>help-quickstarts display information about configuration for all quickstarts </description>
<loadfile
@@ -408,4 +382,72 @@
<echo>${readme}</echo>
</target>
+<!-- ==================================================================== -->
+<!-- This section defines standalone message deployment -->
+<!-- ==================================================================== -->
+
+ <target name="deploy-messaging" unless="messaging.scoped.present">
+ <copy file="${jms.service.file}" overwrite="true" tofile="${org.jboss.esb.server.deploy.dir}/${ant.project.name}-queue-service.xml" failonerror="false"/>
+ </target>
+
+ <target name="undeploy-messaging">
+ <delete file="${org.jboss.esb.server.deploy.dir}/${ant.project.name}-queue-service.xml" quiet="true"/>
+ </target>
+
+<!-- ==================================================================== -->
+<!-- This section defines assertions for determining if the target -->
+<!-- supports JBossWS or EJB. -->
+<!-- ==================================================================== -->
+
+ <target name="assert-ws-available">
+ <available property="ws-available" file="${org.jboss.esb.server.deploy.dir}/jbossws.sar" type="dir" />
+ <fail unless="ws-available">**** DEPLOYMENT FAILED... Sorry, this Quickstart requires a JBoss Webservice container. '${org.jboss.esb.server.home}' does not have a Webservice container. Check the 'org.jboss.esb.server.home' property in ../quickstarts.properties"</fail>
+ <echo message="JBoss Webservice container found on target '${org.jboss.esb.server.deploy.dir}'." />
+ </target>
+
+ <target name="assert-ejb3-available">
+ <available property="ejb3-available" file="${org.jboss.esb.server.deploy.dir}/ejb3.deployer" type="dir" />
+ <fail unless="ejb3-available">**** DEPLOYMENT FAILED... Sorry, this Quickstart requires a JBoss EJB3 container. '${org.jboss.esb.server.home}' does not have an EJB3 container. Check the 'org.jboss.esb.server.home' property in ../quickstarts.properties"</fail>
+ <echo message="JBoss EJB3 container found on target '${org.jboss.esb.server.deploy.dir}'." />
+ </target>
+
+<!-- ==================================================================== -->
+<!-- This section defines properties/targets to be overridden by the -->
+<!-- quickstart specific build.xml file. -->
+<!-- ==================================================================== -->
+
+ <property name="additional.deploys" value="" />
+ <property name="deploy.exploded" value="false" />
+
+ <target name="quickstart-specific-dependencies">
+ <path id="quickstart-dependencies-classpath"/>
+ </target>
+
+ <target name="quickstart-specific-assemblies">
+ <echo message="No Quickstart specific assembly tasks." />
+ </target>
+
+ <target name="quickstart-specific-deploys">
+ <echo message="No Quickstart specific deployments being made." />
+ </target>
+
+ <target name="quickstart-specific-undeploys">
+ <echo message="No Quickstart specific undeployments being made." />
+ </target>
+
+ <target name="config"/>
+
+ <target name="quickstart-specific-clean">
+ <echo message="No Quickstart specific 'clean' being made." />
+ </target>
+
+ <target name="display-instructions">
+ <echo message='${line.separator}******************' />
+ <echo>Quickstart deployed to target JBoss ESB/App Server at '${org.jboss.esb.server.deploy.dir}'.</echo>
+ <echo>1. Check your ESB Server console to make sure the deployment was executed without errors.</echo>
+ <echo>2. Run 'ant runtest' to run the Quickstart.</echo>
+ <echo>3. Check your ESB Server console again. The Quickstart should have produced some output.</echo>
+ <echo message='******************' />
+ </target>
+
</project>
More information about the jboss-svn-commits
mailing list