[jboss-svn-commits] JBL Code SVN: r10295 - labs/jbossesb/trunk/product/samples/quickstarts/helloworld.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Fri Mar 16 21:21:09 EDT 2007
Author: kurt.stam at jboss.com
Date: 2007-03-16 21:21:09 -0400 (Fri, 16 Mar 2007)
New Revision: 10295
Added:
labs/jbossesb/trunk/product/samples/quickstarts/helloworld/base-build.xml
Modified:
labs/jbossesb/trunk/product/samples/quickstarts/helloworld/build.xml
Log:
Switching over the base-build.xml structure
Added: labs/jbossesb/trunk/product/samples/quickstarts/helloworld/base-build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld/base-build.xml (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld/base-build.xml 2007-03-17 01:21:09 UTC (rev 10295)
@@ -0,0 +1,81 @@
+<project name="Base" default="run" basedir=".">
+
+ <property file="../quickstarts.properties" />
+
+ <property name="additional.deploys" value="" />
+
+ <property name="classes" value="build/classes" />
+
+ <path id="compile-classpath">
+ <fileset dir="lib" includes="*.jar" /> <!-- Quickstart Specific Jars. -->
+ <fileset dir="../../../lib/ext" includes="*.jar" /> <!-- Product Dependencies. -->
+ <fileset dir="${esb.product.lib.dir}" includes="*.jar" /> <!-- Product Jars. -->
+ </path>
+ <path id="exec-classpath">
+ <pathelement location="." />
+ <pathelement location="src" />
+ <pathelement location="build/classes" />
+ <path refid="compile-classpath" />
+ <fileset dir="${jbosshome.dir}/server/default/lib" includes="jboss-j2ee.jar" /> <!-- Required for JMS Client Code. -->
+ </path>
+
+ <target name="compile" depends="clean">
+ <mkdir dir="${classes}" />
+ <javac srcdir="src" destdir="${classes}">
+ <classpath refid="compile-classpath" />
+ </javac>
+ </target>
+
+ <target name="run" depends="compile">
+ <echo>Launching Quickstart in standalone mode...</echo>
+ <java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">
+ <arg value="./jbossesb.xml" />
+ <classpath refid="exec-classpath" />
+ </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" depends="compile">
+ <echo>Deploying Quickstart to JBoss ESB Server...</echo>
+
+ <mkdir dir="build/META-INF" />
+ <copy todir="build/META-INF">
+ <fileset dir="./" includes="jboss-esb.xml,deployment.xml" />
+ </copy>
+
+ <jar destfile="build/${ant.project.name}.esb">
+ <fileset dir="build/classes" />
+ <fileset dir="src" excludes="**/*.java" />
+ <fileset dir="build" includes="META-INF/**" />
+ <fileset dir="${basedir}" includes="jbm-queue-service.xml"/>
+ <fileset dir="./" includes="${additional.deploys}" />
+ </jar>
+
+ <copy file="build/${ant.project.name}.esb" overwrite="true" todir="${jbosshome.dir}/server/default/deploy/" />
+
+ <echo message='${line.separator}******************' />
+ <echo>Quickstart deployed to target JBoss ESB Server at '${jbosshome.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>
+
+ <target name="echoCP">
+ <property name="cp" refid="exec-classpath" />
+ <echo message="Classpath is ${cp}" />
+ </target>
+
+ <target name="clean">
+ <delete dir="build" />
+ </target>
+
+</project>
\ No newline at end of file
Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld/base-build.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld/build.xml 2007-03-17 01:07:58 UTC (rev 10294)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld/build.xml 2007-03-17 01:21:09 UTC (rev 10295)
@@ -1,98 +1,30 @@
-<project name="Quickstart_helloworld" default="run" basedir=".">
-
- <property file="../quickstarts.properties" />
-
- <property name="build.dir" value="${basedir}/build"/>
- <property name="src.dir" value="${basedir}/src"/>
-
- <property name="esb-config" value="${basedir}/jbossesb.xml"/>
-
- <path id="classpath">
- <!-- fileset dir="${basedir}" includes="jbossesb-properties.xml" -->
- <!-- fileset dir="${basedir}" includes="juddi.properties" -->
- <fileset dir="${esb.product.lib.dir}/ext" includes="jboss-messaging-client.jar"/>
- <fileset dir="${basedir}/lib" includes="*jar"/>
- <fileset dir="${esb.product.lib.dir}" includes="*jar"/>
- <fileset dir="${esb.product.lib.dir}" includes="*xml"/>
+<project name="Helloworld-quickstart" default="run" basedir=".">
- <fileset dir="${esb.product.lib.dir}/ext" includes="*jar"/>
- <fileset dir="${jbosshome.dir}/client" includes="*jar"/>
- <fileset dir="${jbosshome.dir}/server/default/lib">
- <include name="jboss-j2ee.jar"/> <!-- added this for the JMS client -->
- </fileset>
-
- <fileset dir="${basedir}" includes="build/**/*.jar"/>
- <fileset dir="${basedir}" includes="build/**/*.xml"/>
- <pathelement location="." />
-
- </path>
-
- <property name="cp" refid="classpath"/>
-
- <target name="echoCP">
- <echo message="Classpath is ${cp}"/>
- </target>
-
- <target name="prepare">
- <mkdir dir="${build.dir}" />
- </target>
-
- <target name="clean">
- <delete dir="${build.dir}" />
- </target>
-
- <target name="compile" depends="prepare">
- <javac srcdir="${src.dir}"
- destdir="${build.dir}">
- <classpath refid="classpath"/>
- </javac>
- </target>
-
- <target name="jars" depends="compile">
- <copy file="jboss-esb.xml" todir="${build.dir}/META-INF"/>
- <copy file="jbm-queue-service.xml" todir="${build.dir}"/>
- <delete file="${build.dir}/${ant.project.name}.esb"/>
- <jar destfile="${build.dir}/${ant.project.name}.esb"
- basedir="${build.dir}"
- includes="**/MyJMSListenerAction.class,**/jboss-esb.xml,jbm-queue-service.xml"/>
- <delete file="${build.dir}/${ant.project.name}-client.jar"/>
- <jar destfile="${build.dir}/${ant.project.name}-client.jar"
- basedir="${build.dir}"
- includes="**/test/*.class"/>
- </target>
-
- <target name="run" depends="jars">
- <echo>Basic JMS Gateway and Listener with Actions</echo>
- <java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">
- <arg value="${esb-config}"/>
- <classpath refid="classpath"/>
- </java>
- </target>
-
- <target name="deploy" depends="jars">
- <echo>Deploys the project to the JBoss Application Server</echo>
- <copy file="${build.dir}/${ant.project.name}.esb" overwrite="true"
- todir="${jbosshome.dir}/server/default/deploy/"
- />
- <echo>Check your AS console to see if everything deployed properly then run 'ant runtest'</echo>
- </target>
+ <!-- Additional files to be deployed in the sar. -->
+ <property name="additional.deploys" value="smooks-cdr.lst,smooks-res.xml" />
- <target name="runtest">
- <echo>Runs Test JMS Sender</echo>
- <java fork="yes" classname="quickstart.helloworld.test.SendJMSMessage" failonerror="true">
- <arg value="Hello World"/>
- <classpath refid="classpath"/>
- </java>
- </target>
-
- <target name="sendesb">
- <echo>Runs Test ESB Message Sender</echo>
- <java fork="yes" classname="quickstart.helloworld.test.SendEsbMessage" failonerror="true">
- <arg value="FirstServiceESB"/> <!-- service category -->
- <arg value="SimpleListener"/> <!-- service name -->
- <arg value="Hello World - Straight to ESB listener - no Gateway"/> <!-- Message text -->
- <classpath refid="classpath"/>
- </java>
- </target>
-
+ <!-- Import the base Ant build script... -->
+ <import file="base-build.xml"/>
+
+ <!-- The ESB itself is started by the default "run" target - defined in base-build.xml -->
+
+ <!-- Target for injecting the sample order message for transformation... -->
+ <target name="runtest">
+ <echo>Runs Test JMS Sender</echo>
+ <java fork="yes" classname="quickstart.helloworld.test.SendJMSMessage" failonerror="true">
+ <arg value="Hello World"/>
+ <classpath refid="exec-classpath"/>
+ </java>
+ </target>
+
+ <target name="sendesb">
+ <echo>Runs Test ESB Message Sender</echo>
+ <java fork="yes" classname="quickstart.helloworld.test.SendEsbMessage" failonerror="true">
+ <arg value="FirstServiceESB"/> <!-- service category -->
+ <arg value="SimpleListener"/> <!-- service name -->
+ <arg value="Hello World - Straight to ESB listener - no Gateway"/> <!-- Message text -->
+ <classpath refid="exec-classpath"/>
+ </java>
+ </target>
+
</project>
\ No newline at end of file
More information about the jboss-svn-commits
mailing list