[jboss-cvs] JBossAS SVN: r104755 - in branches/JBPAPP_5_1_hornetq-int: hornetq-int and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu May 13 04:41:21 EDT 2010
Author: ataylor
Date: 2010-05-13 04:41:20 -0400 (Thu, 13 May 2010)
New Revision: 104755
Added:
branches/JBPAPP_5_1_hornetq-int/hornetq-int/src/etc/javaee-examples-build.xml
branches/JBPAPP_5_1_hornetq-int/hornetq-int/src/etc/jms-examples-build.xml
Modified:
branches/JBPAPP_5_1_hornetq-int/build/build-distr.xml
branches/JBPAPP_5_1_hornetq-int/hornetq-int/build.xml
Log:
added examples to hornetq integration
Modified: branches/JBPAPP_5_1_hornetq-int/build/build-distr.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/build/build-distr.xml 2010-05-13 06:59:19 UTC (rev 104754)
+++ branches/JBPAPP_5_1_hornetq-int/build/build-distr.xml 2010-05-13 08:41:20 UTC (rev 104755)
@@ -802,6 +802,11 @@
<include name="resources/*.properties"/>
<include name="lib/**/*"/>
</fileset>
+ <fileset dir="${_module.output}/etc">
+ <include name="examples/**/*"/>
+ <exclude name="examples/soak"/>
+ <exclude name="examples/core"/>
+ </fileset>
</copy>
<copy todir="${install.root}/extras/hornetq/">
<fileset dir="${_module.output}/etc">
Modified: branches/JBPAPP_5_1_hornetq-int/hornetq-int/build.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/hornetq-int/build.xml 2010-05-13 06:59:19 UTC (rev 104754)
+++ branches/JBPAPP_5_1_hornetq-int/hornetq-int/build.xml 2010-05-13 08:41:20 UTC (rev 104755)
@@ -163,11 +163,17 @@
<unzip dest="output/etc" src="${org.hornetq.lib}/hornetq-resources.jar"/>
+ <replace dir="output/etc/examples/javaee" value="">
+ <replacetoken><![CDATA[@ResourceAdapter("hornetq-ra.rar")]]></replacetoken>
+ </replace>
+ <echo>andytaylor</echo>
<copy todir="output/etc">
<fileset dir="${source.etc}">
<include name="switch.sh"/>
</fileset>
</copy>
+ <copy tofile="output/etc/examples/common/build.xml" file="${source.etc}/jms-examples-build.xml"/>
+ <copy tofile="output/etc/examples/javaee/common/build.xml" file="${source.etc}/javaee-examples-build.xml"/>
</target>
<!-- ================================================================== -->
Added: branches/JBPAPP_5_1_hornetq-int/hornetq-int/src/etc/javaee-examples-build.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/hornetq-int/src/etc/javaee-examples-build.xml (rev 0)
+++ branches/JBPAPP_5_1_hornetq-int/hornetq-int/src/etc/javaee-examples-build.xml 2010-05-13 08:41:20 UTC (rev 104755)
@@ -0,0 +1,185 @@
+<?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="compile" name="javaeeexample" basedir=".">
+ <dirname property="imported.basedir" file="${ant.file.javaeeexample}"/>
+ <property file="${imported.basedir}/config/ant.properties"/>
+ <property name="example.config.dir" value="config"/>
+ <property file="${example.config.dir}/ant.properties"/>
+ <property name="hornetq.example.logserveroutput" value="true"/>
+ <property name="hornetq.jars.dir" value="../../../lib"/>
+ <property name="jboss.common.jars.dir" value="../../../../../common/lib"/>
+ <property name="jboss.client.jars.dir" value="../../../../../client"/>
+ <property name="jboss.jars.dir" value="../../../../../lib"/>
+ <property name="aio.library.path" value="../../native/bin"/>
+ <property name="example.server.dir" value="server"/>
+ <property name="jboss.home" value="../../../../../"/>
+
+ <!--
+ This module is based on Java 1.5
+ -->
+
+ <property name="javac.target" value="1.5"/>
+ <property name="javac.source" value="1.5"/>
+
+ <property name="javac.debug" value="true"/>
+ <property name="javac.optimize" value="false"/>
+ <property name="javac.depend" value="false"/>
+ <property name="javac.verbose" value="false"/>
+ <property name="javac.deprecation" value="true"/>
+ <property name="javac.include.ant.runtime" value="false"/>
+ <property name="javac.include.java.runtime" value="true"/>
+ <property name="javac.fail.onerror" value="true"/>
+
+ <property name="src.dir" value="src"/>
+ <property name="example.classname" value="this.shouldn't.be.run.directly"/>
+ <property name="hornetq.example.runServer" value="true"/>
+ <property name="hornetq.example.beans.file" value="server0"/>
+
+ <property name="build.dir" value="build"/>
+ <property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="config.dir" value="${imported.basedir}/config"/>
+ <property name="example.config.dir" value="config"/>
+
+ <path id="jms.compilation.classpath">
+ <fileset dir="${hornetq.jars.dir}">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${hornetq.jars.dir}">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${jboss.home}/client">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${jboss.common.jars.dir}">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+ <path id="jms.runtime.classpath">
+ <path refid="jms.compilation.classpath"/>
+ <pathelement location="${config.dir}"/>
+ <pathelement location="${example.config.dir}"/>
+ <pathelement location="${classes.dir}"/>
+ </path>
+ <target name="init">
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${classes.dir}"/>
+ </target>
+
+ <target name="compile" depends="init">
+ <javac destdir="${classes.dir}"
+ target="${javac.target}"
+ source="${javac.source}"
+ optimize="${javac.optimize}"
+ debug="${javac.debug}"
+ depend="${javac.depend}"
+ verbose="${javac.verbose}"
+ deprecation="${javac.deprecation}"
+ includeAntRuntime="${javac.include.ant.runtime}"
+ includeJavaRuntime="${javac.include.java.runtime}"
+ failonerror="${javac.fail.onerror}">
+ <src>
+ <pathelement path="${src.dir}"/>
+ </src>
+ <classpath refid="jms.compilation.classpath"/>
+ </javac>
+ </target>
+
+ <target name="jar" depends="compile">
+ <jar destfile="${build.dir}/${example.name}-example.jar"
+ basedir="${classes.dir}"
+ includes="org/hornetq/javaee/example/server/**/*">
+ </jar>
+ </target>
+
+ <target name="war" depends="jar">
+ <jar destfile="${build.dir}/${example.name}-example.war" basedir="${example.config.dir}"
+ includes="WEB-INF/**/*"/>
+ </target>
+
+ <target name="ear" depends="war">
+ <jar destfile="${build.dir}/${example.name}-example.ear" basedir="${build.dir}">
+ <include name="${example.name}-example.jar"/>
+ <include name="${example.name}-example.war"/>
+ <fileset dir="${example.config.dir}">
+ <include name="META-INF/**"/>
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="deploy" depends="copy-profile, copy-resources, ear">
+ <property name="example-profile" value="${jboss.home}/server/${example.name}-example-profile"/>
+ <copy todir="${example-profile}/deploy/hornetq.sar">
+ <fileset dir="${example.server.dir}"/>
+ </copy>
+ <copy todir="${example-profile}/deploy/">
+ <fileset dir="${build.dir}">
+ <include name="${example.name}-example.ear"/>
+ <exclude name="**/data/**"/>
+ <exclude name="**/log/**"/>
+ <exclude name="**/tmp/**"/>
+ </fileset>
+ </copy>
+ <exec dir="${jboss.home}/bin" executable="sh" osfamily="unix">
+ <arg line="run.sh -c ${example.name}-example-profile"/>
+ </exec>
+ <exec dir="${jboss.home}/bin" executable="cmd" osfamily="windows">
+ <arg line="/c run.bat -c ${example.name}-example-profile"/>
+ </exec>
+ </target>
+
+ <target name="copy-profile" depends="profile.check" unless="donot.copy.profile">
+ <property name="profile" value="${jboss.home}/server/default"/>
+ <property name="example-profile" value="${jboss.home}/server/${example.name}-example-profile"/>
+ <property name="deploy.dir" value="${example-profile}/deploy/"/>
+ <mkdir dir="${example-profile}"/>
+ <copy todir="${example-profile}">
+ <fileset dir="${profile}">
+ <exclude name="**/*hornetq-configuration.xml"/>
+ <exclude name="**/*hornetq-jms.xml"/>
+ <exclude name="**/*hornetq-users.xml"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- can be overriden if the example requires to copy resources after the
+ profile is created and before the server is started -->
+ <target name="copy-resources">
+ </target>
+
+ <target name="profile.check">
+ <property name="example-profile" value="${jboss.home}/server/${example.name}-example-profile"/>
+ <condition property="donot.copy.profile">
+ <available file="${example-profile}" type="dir"/>
+ </condition>
+ </target>
+
+ <target name="undeploy" >
+ <property name="example-profile" value="${jboss.home}/server/${example.name}-example-profile"/>
+ <delete dir="${example-profile}"/>
+ </target>
+
+
+ <target name="runExample" depends="compile">
+ <java classname="${example.classname}" fork="true">
+ <classpath refid="jms.runtime.classpath"/>
+ </java>
+
+ </target>
+
+ <target name="clean">
+ <delete dir="./build" quiet="true"/>
+ </target>
+
+</project>
Added: branches/JBPAPP_5_1_hornetq-int/hornetq-int/src/etc/jms-examples-build.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/hornetq-int/src/etc/jms-examples-build.xml (rev 0)
+++ branches/JBPAPP_5_1_hornetq-int/hornetq-int/src/etc/jms-examples-build.xml 2010-05-13 08:41:20 UTC (rev 104755)
@@ -0,0 +1,211 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE project [
+ <!ENTITY libraries SYSTEM "../../../thirdparty/libraries.ent">
+ ]>
+<!--
+ ~ 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="compile" name="example" basedir=".">
+
+ <property name="hornetq.run_script" value="false" />
+
+
+ <dirname property="imported.basedir" file="${ant.file.example}"/>
+
+ <property name="hornetq.example.logserveroutput" value="true"/>
+ <property name="hornetq.jars.dir" value="../../../lib"/>
+ <property name="jboss.common.jars.dir" value="../../../../../common/lib"/>
+ <property name="jboss.client.jars.dir" value="../../../../../client"/>
+ <property name="jboss.jars.dir" value="../../../../../lib"/>
+ <property name="aio.library.path" value="../../native/bin"/>
+
+ <!--
+ This module is based on Java 1.6
+ -->
+
+ <property name="javac.target" value="1.6"/>
+ <property name="javac.source" value="1.6"/>
+
+ <property name="javac.debug" value="true"/>
+ <property name="javac.optimize" value="false"/>
+ <property name="javac.depend" value="false"/>
+ <property name="javac.verbose" value="false"/>
+ <property name="javac.deprecation" value="true"/>
+ <property name="javac.include.ant.runtime" value="false"/>
+ <property name="javac.include.java.runtime" value="true"/>
+ <property name="javac.fail.onerror" value="true"/>
+
+ <property name="src.dir" value="${imported.basedir}/src"/>
+ <property name="src.example.dir" location="src"/>
+ <property name="example.classname" value="this.shouldn't.be.run.directly"/>
+ <property name="hornetq.example.runServer" value="true"/>
+ <property name="hornetq.example.beans.file" value="server0"/>
+
+ <property name="build.dir" value="build"/>
+ <property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="config.dir" value="${imported.basedir}/config"/>
+ <property name="example.config.dir" value="config"/>
+ <path id="extra.classpath">
+ </path>
+
+ <path id="compilation.classpath">
+ <fileset dir="${hornetq.jars.dir}">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${jboss.common.jars.dir}">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${jboss.jars.dir}">
+ <include name="**/*.jar"/>
+ </fileset>
+ <path refid="extra.classpath"/>
+ </path>
+
+ <path id="client.compilation.classpath">
+ <fileset dir="${hornetq.jars.dir}">
+ <include name="**/*client*.jar"/>
+ <include name="**/netty.jar"/>
+ </fileset>
+ <fileset dir="${jboss.client.jars.dir}">
+ <include name="**/*.jar"/>
+ </fileset>
+ <path refid="extra.classpath"/>
+ </path>
+
+ <path id="client.classpath">
+ <path refid="client.compilation.classpath"/>
+ <pathelement location="${config.dir}"/>
+ <pathelement location="${example.config.dir}"/>
+ <pathelement location="${classes.dir}"/>
+ <fileset dir="${hornetq.jars.dir}">
+ <include name="**/*client*.jar"/>
+ </fileset>
+ <fileset dir="${jboss.common.jars.dir}">
+ <include name="**/netty*.jar"/>
+ </fileset>
+ </path>
+
+ <path id="server.classpath">
+ <path refid="compilation.classpath"/>
+ <pathelement location="${config.dir}"/>
+ <pathelement location="${example.config.dir}"/>
+ <pathelement location="${classes.dir}"/>
+ <fileset dir="${jboss.common.jars.dir}">
+ <include name="org/jboss/naming/lib/jnpserver.jar"/>
+ <include name="org/jboss/netty/lib/netty*.jar"/>
+ </fileset>
+ </path>
+
+
+ <target name="init">
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${classes.dir}"/>
+ </target>
+
+ <target name="compile" depends="init">
+ <echo message="src.example.dir=${src.example.dir}"/>
+ <javac destdir="${classes.dir}"
+ target="${javac.target}"
+ source="${javac.source}"
+ optimize="${javac.optimize}"
+ debug="${javac.debug}"
+ depend="${javac.depend}"
+ verbose="${javac.verbose}"
+ deprecation="${javac.deprecation}"
+ includeAntRuntime="${javac.include.ant.runtime}"
+ includeJavaRuntime="${javac.include.java.runtime}"
+ failonerror="${javac.fail.onerror}">
+ <src>
+ <pathelement path="${src.dir}"/>
+ <pathelement path="${src.example.dir}"/>
+ </src>
+ <classpath refid="compilation.classpath"/>
+ </javac>
+ </target>
+
+
+ <target name="runExample" depends="compile">
+
+ <property name="serverclasspath" refid="server.classpath"/>
+ <property name="clientClasspath" refid="client.classpath"/>
+ <!--<echo>client classpath = ${clientClasspath}</echo>-->
+ <property file="${imported.basedir}/config/server.properties"/>
+ <java classname="${example.classname}" fork="true" resultproperty="example-result">
+ <jvmarg value="-Dhornetq.example.server.classpath=${serverclasspath}"/>
+ <jvmarg value="-Dhornetq.example.server.args=${server.args}"/>
+ <jvmarg value="-Dhornetq.example.logserveroutput=${hornetq.example.logserveroutput}"/>
+ <jvmarg value="-Dhornetq.example.runServer=${hornetq.example.runServer}"/>
+ <arg line="${hornetq.example.beans.file}"/>
+ <sysproperty key="java.library.path" value="${java.library.path}${path.separator}${aio.library.path}"/>
+ <classpath refid="client.classpath"/>
+ </java>
+ <!-- if the example exited with a result value != 0, we fail the build -->
+ <fail message="Example ${example.classname} failed">
+ <condition>
+ <not>
+ <equals arg1="${example-result}" arg2="0"/>
+ </not>
+ </condition>
+ </fail>
+ </target>
+
+ <target name="clean-all">
+ <subant target="clean" failonerror="true">
+ <fileset dir=".." includes="*/build.xml" excludes="common/build.xml"/>
+ </subant>
+ </target>
+
+ <target name="clean">
+ <delete dir="./build" quiet="true"/>
+ <delete dir="./logs" quiet="true"/>
+ <delete dir="./server0/logs" quiet="true"/>
+ <delete dir="./server0/data" quiet="true"/>
+ <delete dir="./server0/build" quiet="true"/>
+ <delete dir="./server1/logs" quiet="true"/>
+ <delete dir="./server1/data" quiet="true"/>
+ <delete dir="./server2/logs" quiet="true"/>
+ <delete dir="./server2/data" quiet="true"/>
+ <delete dir="./server3/logs" quiet="true"/>
+ <delete dir="./server3/data" quiet="true"/>
+ <delete dir="./server4/logs" quiet="true"/>
+ <delete dir="./server4/data" quiet="true"/>
+ <delete dir="./server5/logs" quiet="true"/>
+ <delete dir="./server5/data" quiet="true"/>
+ <delete dir="./ObjectStore" quiet="true"/>
+ <delete dir="./data" quiet="true"/>
+ <!-- large-message creates huge .dat files -->
+ <delete>
+ <fileset dir=".">
+ <include name="*.dat"/>
+ </fileset>
+ </delete>
+ </target>
+
+ <target name="all" description="Run all the examples">
+ <subant target="run" failonerror="true">
+ <fileset dir="..">
+ <include name="core/*/build.xml"/>
+ <include name="jms/*/build.xml"/>
+ <exclude name="common/build.xml"/>
+ <exclude name="core/perf/build.xml"/>
+ <exclude name="jms/applet/build.xml"/>
+ <exclude name="jms/clustered-standalone/build.xml"/>
+ <exclude name="jms/jms-bridge/build.xml"/>
+ <exclude name="jms/large-message/build.xml"/>
+ <exclude name="jms/perf/build.xml"/>
+ </fileset>
+ </subant>
+
+ <echo message="Do not forget to run jms/applet, jms/clustered-standalone & jms-bridge examples manually!" />
+ </target>
+
+</project>
More information about the jboss-cvs-commits
mailing list