[hornetq-commits] JBoss hornetq SVN: r9659 - in branches/Branch_2_1: examples/common and 12 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Sep 9 02:32:11 EDT 2010


Author: clebert.suconic at jboss.com
Date: 2010-09-09 02:32:10 -0400 (Thu, 09 Sep 2010)
New Revision: 9659

Added:
   branches/Branch_2_1/examples-eap/
   branches/Branch_2_1/examples-eap/common/
   branches/Branch_2_1/examples-eap/common/config/
   branches/Branch_2_1/examples-eap/common/config/ant.properties
   branches/Branch_2_1/examples-eap/javaee/
   branches/Branch_2_1/examples-eap/javaee/common/
   branches/Branch_2_1/examples-eap/javaee/common/config/
   branches/Branch_2_1/examples-eap/javaee/common/config/ant.properties
   branches/Branch_2_1/examples-eap/readme
Modified:
   branches/Branch_2_1/build-hornetq.xml
   branches/Branch_2_1/examples/common/build.xml
   branches/Branch_2_1/examples/common/config/ant.properties
   branches/Branch_2_1/examples/core/embedded-remote/build.xml
   branches/Branch_2_1/examples/core/embedded/build.xml
   branches/Branch_2_1/examples/core/microcontainer/build.xml
   branches/Branch_2_1/examples/javaee/common/build.xml
   branches/Branch_2_1/examples/javaee/common/config/ant.properties
Log:
Making the examples runnable with EAP (commit 1)

Modified: branches/Branch_2_1/build-hornetq.xml
===================================================================
--- branches/Branch_2_1/build-hornetq.xml	2010-09-08 22:11:16 UTC (rev 9658)
+++ branches/Branch_2_1/build-hornetq.xml	2010-09-09 06:32:10 UTC (rev 9659)
@@ -85,6 +85,7 @@
    <property name="resources.jar.name" value="hornetq-resources.jar"/>
    <property name="resources.sources.jar.name" value="hornetq-resources-sources.jar"/>
    <property name="twitter4j.jar.name" value="twitter4j-core.jar"/>
+   <property name="eap.examples.zip.name" value="hornetq-eap-examples.zip"/>
 
    <!--source and build dirs-->
    <property name="build.dir" value="build"/>
@@ -724,7 +725,7 @@
    </target>
 
    <target name="jar"
-           depends="jar-core, jar-core-client, jar-core-client-java5, jar-jms, jar-jms-client, jar-jms-client-java5, jar-jboss-integration, jar-jboss-service, jar-bootstrap, jar-logging, jar-ra, jar-mc, jar-jnp-client, jar-resources, sources-jar, jar-twitter-integration">
+           depends="jar-core, jar-core-client, jar-core-client-java5, jar-jms, jar-jms-client, jar-jms-client-java5, jar-jboss-integration, jar-jboss-service, jar-bootstrap, jar-logging, jar-ra, jar-mc, jar-jnp-client, jar-resources, sources-jar, jar-twitter-integration, eap-examples">
    </target>
 
    <target name="jar-jnp-client" depends="init">
@@ -1275,8 +1276,30 @@
       <gzip src="${build.dir}/${build.artifact}.tar"
             destfile="${build.dir}/${build.artifact}.tar.gz"/>
    </target>
+	
+   <target name="eap-examples" description="Generates a file with examples tuned for the JBoss EAP" depends="init">
+   	  <mkdir dir="${build.dir}/eap-examples-tmp"/>
+   	   
+   	
+   	  <copy todir="${build.dir}/eap-examples-tmp">
+   	  	  <fileset dir="${examples.dir}" excludes="**/build.sh,**/build.bat"/>
+   	  </copy>
+   	
+   	  <copy todir="${build.dir}/eap-examples-tmp" overwrite="true">
+   	  	   <fileset dir="examples-eap"/>
+   	  </copy>
+   	
+   	  <replace dir="${build.dir}/eap-examples-tmp" token="hornetq-ra.rar" value="jms-ra.rar"></replace>
+   	
+   	  <zip destfile="${build.jars.dir}/${eap.examples.zip.name}">
+   	  	 <zipfileset dir="${build.dir}/eap-examples-tmp" prefix="examples/hornetq"/>
+   	  </zip>
+   	
+   	  <delete dir="${build.dir}/eap-examples-tmp"/> 
+	</target>
 
 
+
    <target name="source-distro">
       <mkdir dir="${build.dir}"/>
       <zip destfile="${build.dir}/${build.artifact}-src.zip">

Modified: branches/Branch_2_1/examples/common/build.xml
===================================================================
--- branches/Branch_2_1/examples/common/build.xml	2010-09-08 22:11:16 UTC (rev 9658)
+++ branches/Branch_2_1/examples/common/build.xml	2010-09-09 06:32:10 UTC (rev 9659)
@@ -26,6 +26,7 @@
       </condition>
    </fail>
 
+   <property environment="ENV"/>
    <dirname property="imported.basedir" file="${ant.file.example}"/>
    <property file="${imported.basedir}/config/ant.properties"/>
 
@@ -60,21 +61,25 @@
 
    <path id="compilation.classpath">
       <fileset dir="${hornetq.jars.dir}">
-         <include name="**/*.jar"/>
+         <include name="**/hornetq*.jar"/>
       </fileset>
        <fileset dir="${jars.dir}">
-         <include  name="**/jboss-jms-api.jar"/>
+         <include name="**/${jms-library}"/>
+       	 <include name="**/jboss-kernel.jar"/>
       </fileset>
       <path refid="extra.classpath"/>
    </path>
 
    <path id="client.compilation.classpath">
       <fileset dir="${hornetq.jars.dir}">
+         <include name="**/jnpserver.jar"/>
          <include name="**/*client*.jar"/>
-         <include  name="**/jboss-jms-api.jar"/>
+         <include name="**/${jms-library}"/>
+         <include name="**/netty.jar"/>
       </fileset>
        <fileset dir="${jars.dir}">
-         <include name="**/jboss-jms-api.jar"/>
+         <include name="**/jnpserver.jar"/>
+         <include name="**/${jms-library}"/>
          <include name="**/netty.jar"/>
       </fileset>
       <path refid="extra.classpath"/>
@@ -86,10 +91,12 @@
       <pathelement location="${example.config.dir}"/>
       <pathelement location="${classes.dir}"/>
       <fileset dir="${hornetq.jars.dir}">
-       	 <include name="**/*client*.jar"/>
+         <include name="**/hornetq*.jar"/>
       </fileset>
       <fileset dir="${jars.dir}">
-         <include name="**/netty*.jar"/>
+     	 <include name="**/jboss-logging-spi.jar"/>
+        <include name="**/${jms-library}"/>
+      	 <include name="**/jboss-kernel.jar"/>
       </fileset>
    </path>
 
@@ -98,10 +105,21 @@
       <pathelement location="${config.dir}"/>
       <pathelement location="${example.config.dir}"/>
       <pathelement location="${classes.dir}"/>
+      <fileset dir="${hornetq.jars.dir}">
+        <include name="**/jnpserver.jar"/>
+        <include name="**/netty*.jar"/>
+      </fileset>
       <fileset dir="${jars.dir}">
-         <include name="org/jboss/naming/lib/jnpserver.jar"/>
-         <include name="org/jboss/netty/lib/netty*.jar"/>
-         <include name="org/twitter4j/lib/twitter4j*.jar"/>
+      	 <include name="**/jboss-logging-spi.jar"/>
+         <include name="**/jnpserver.jar"/>
+         <include name="**/netty*.jar"/>
+         <include name="**/jboss-reflect.jar"/>
+      	 <include name="**/jboss-common-core.jar"/>
+     	 <include name="**/jboss-dependency.jar"/>
+    	 <include name="**/jboss-mdr.jar"/>
+   	     <include name="**/jbossxb.jar"/>
+   	     <include name="**/jboss-xml-binding.jar"/>
+         <include name="**/twitter4j*.jar"/>
       </fileset>
    </path>
 
@@ -137,7 +155,7 @@
 
       <property name="serverclasspath" refid="server.classpath"/>
       <property name="clientClasspath" refid="client.classpath"/>
-      <!--<echo>client classpath = ${clientClasspath}</echo>-->
+      <!-- <echo>server classpath = ${serverclasspath}</echo> -->
       <property file="${imported.basedir}/config/server.properties"/>
       <java classname="${example.classname}" fork="true" resultproperty="example-result">
          <jvmarg value="-Dhornetq.example.server.classpath=${serverclasspath}"/>

Modified: branches/Branch_2_1/examples/common/config/ant.properties
===================================================================
--- branches/Branch_2_1/examples/common/config/ant.properties	2010-09-08 22:11:16 UTC (rev 9658)
+++ branches/Branch_2_1/examples/common/config/ant.properties	2010-09-09 06:32:10 UTC (rev 9659)
@@ -2,3 +2,4 @@
 hornetq.jars.dir=${imported.basedir}/../../build/jars
 jars.dir=${imported.basedir}/../../thirdparty
 aio.library.path=${imported.basedir}/../../native/bin
+jms-library=jboss-jms-api.jar

Modified: branches/Branch_2_1/examples/core/embedded/build.xml
===================================================================
--- branches/Branch_2_1/examples/core/embedded/build.xml	2010-09-08 22:11:16 UTC (rev 9658)
+++ branches/Branch_2_1/examples/core/embedded/build.xml	2010-09-09 06:32:10 UTC (rev 9659)
@@ -23,6 +23,7 @@
    <path id="local.classpath">
       <fileset dir="${hornetq.jars.dir}">
         <include name="hornetq-core.jar"/>
+        <include name="**/netty*jar"/>
       </fileset>
       <fileset dir="${jars.dir}">
         <include name="**/netty*jar"/>

Modified: branches/Branch_2_1/examples/core/embedded-remote/build.xml
===================================================================
--- branches/Branch_2_1/examples/core/embedded-remote/build.xml	2010-09-08 22:11:16 UTC (rev 9658)
+++ branches/Branch_2_1/examples/core/embedded-remote/build.xml	2010-09-09 06:32:10 UTC (rev 9659)
@@ -22,6 +22,7 @@
    <path id="remote.classpath">
     <fileset dir="${hornetq.jars.dir}">
       <include name="hornetq-core.jar"/>
+      <include name="**/netty*jar"/>
     </fileset>
  	  <fileset dir="${jars.dir}">
       <include name="**/netty*jar"/>

Modified: branches/Branch_2_1/examples/core/microcontainer/build.xml
===================================================================
--- branches/Branch_2_1/examples/core/microcontainer/build.xml	2010-09-08 22:11:16 UTC (rev 9658)
+++ branches/Branch_2_1/examples/core/microcontainer/build.xml	2010-09-09 06:32:10 UTC (rev 9659)
@@ -25,16 +25,36 @@
          <include name="hornetq-core.jar"/>
          <include name="hornetq-bootstrap.jar"/>
          <include name="hornetq-jbossas-security.jar"/>
+        <include name="**/netty*jar"/>
+        <include name="**/jboss-kernel.jar"/>
+        <include name="**/jboss-mc.jar"/>
+        <include name="**/jboss-logging-spi.jar"/>
+      	<include name="**/jboss-reflect.jar"/>
+      	<include name="**/jboss-common-core.jar"/>
+      	<include name="**/jboss-dependency.jar"/>
+      	<include name="**/jboss-mdr.jar"/>
+      	<include name="**/jboss-xml-binding.jar"/>
+      		      	
       </fileset>
-      <fileset dir="${hornetq.jars.dir}">
-         <include name="jboss-mc.jar"/>
-      </fileset>
       <fileset dir="${jars.dir}">
          <include name="**/netty*jar"/>
 
+      	 <exclude name="**/*-sources.jar"/>
 
-         <exclude name="**/*-sources.jar"/>
+         <include name="**/jboss-mc.jar"/>
 
+      	<include name="**/hornetq-core.jar"/>
+        <include name="**/hornetq-bootstrap.jar"/>
+        <include name="**/hornetq-jbossas-security.jar"/>
+        <include name="**/jboss-mc.jar"/>
+        <include name="**/jboss-kernel.jar"/>
+        <include name="**/jboss-logging-spi.jar"/>
+      	<include name="**/jboss-reflect.jar"/>
+      	<include name="**/jboss-common-core.jar"/>
+      	<include name="**/jboss-dependency.jar"/>
+      	<include name="**/jboss-mdr.jar"/>
+      	<include name="**/jboss-xml-binding.jar"/>
+      	
 
          <!-- <include name="**/*.jar"/>
          -->

Modified: branches/Branch_2_1/examples/javaee/common/build.xml
===================================================================
--- branches/Branch_2_1/examples/javaee/common/build.xml	2010-09-08 22:11:16 UTC (rev 9658)
+++ branches/Branch_2_1/examples/javaee/common/build.xml	2010-09-09 06:32:10 UTC (rev 9659)
@@ -12,12 +12,12 @@
   ~ permissions and limitations under the License.
   -->
 <project default="compile" name="javaeeexample" basedir=".">
+   <property environment="ENV"/>
    <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="example.server.dir" value="server"/>
-   <property environment="ENV"/>
    <property name="jboss.home" value="${ENV.JBOSS_HOME}"/>
 
    <!--
@@ -56,7 +56,7 @@
       <fileset dir="${jboss.home}/client">
          <include name="**/*.jar"/>
       </fileset>
-      <fileset dir="${jboss.home}/server/default-with-hornetq/lib">
+      <fileset dir="${jboss.home}/server/${server.default}/lib">
          <include name="netty*.jar"/>
       </fileset>
    </path>
@@ -116,7 +116,7 @@
 
    <target name="deploy" depends="validate-jboss, copy-profile, copy-resources, ear">
       <property name="example-profile" value="${jboss.home}/server/${example.name}-example-profile"/>
-      <copy todir="${example-profile}/deploy/hornetq.sar" overwrite="true">
+      <copy todir="${example-profile}/deploy/${hornetq.config.dir}" overwrite="true">
          <fileset dir="${example.server.dir}"/>
       </copy>
       <copy todir="${example-profile}/deploy/" overwrite="true">
@@ -136,7 +136,7 @@
    </target>
 
    <target name="copy-profile" depends="profile.check" unless="donot.copy.profile">
-      <property name="profile" value="${jboss.home}/server/default-with-hornetq"/>
+      <property name="profile" value="${jboss.home}/server/${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}"/>
@@ -168,8 +168,8 @@
 
    <target name="validate-jboss">
       <fail unless="ENV.JBOSS_HOME" message="JBOSS_HOME environment variable not set! Set it and try again."/>
-      <available property="default-config" type="dir" file="${jboss.home}/server/default-with-hornetq"/>
-      <fail unless="default-config" message="${jboss.home}/server/default-with-hornetq not found!"/>
+      <available property="default-config" type="dir" file="${jboss.home}/server/${server.default}"/>
+      <fail unless="default-config" message="${jboss.home}/server/${server.default} not found!"/>
    </target>
 
    <target name="runExample" depends="validate-jboss,compile">

Modified: branches/Branch_2_1/examples/javaee/common/config/ant.properties
===================================================================
--- branches/Branch_2_1/examples/javaee/common/config/ant.properties	2010-09-08 22:11:16 UTC (rev 9658)
+++ branches/Branch_2_1/examples/javaee/common/config/ant.properties	2010-09-09 06:32:10 UTC (rev 9659)
@@ -1,4 +1,7 @@
 hornetq.example.logserveroutput=true
 logging.properties=${imported.basedir}/../../src/config/logging.properties
 hornetq.jars.dir=${imported.basedir}/../../../build/jars
-jars.dir=${imported.basedir}/../../../thirdparty
\ No newline at end of file
+jars.dir=${imported.basedir}/../../../thirdparty
+server.default=default-with-hornetq
+hornetq.config.dir=hornetq.sar
+jms-library=jboss-jms-api.jar

Added: branches/Branch_2_1/examples-eap/common/config/ant.properties
===================================================================
--- branches/Branch_2_1/examples-eap/common/config/ant.properties	                        (rev 0)
+++ branches/Branch_2_1/examples-eap/common/config/ant.properties	2010-09-09 06:32:10 UTC (rev 9659)
@@ -0,0 +1,5 @@
+hornetq.example.logserveroutput=true
+hornetq.jars.dir=${ENV.JBOSS_HOME}/common/lib
+jars.dir=${ENV.JBOSS_HOME}/lib
+aio.library.path=${ENV.JBOSS_HOME}/common/lib
+jms-library=jboss-javaee.jar

Added: branches/Branch_2_1/examples-eap/javaee/common/config/ant.properties
===================================================================
--- branches/Branch_2_1/examples-eap/javaee/common/config/ant.properties	                        (rev 0)
+++ branches/Branch_2_1/examples-eap/javaee/common/config/ant.properties	2010-09-09 06:32:10 UTC (rev 9659)
@@ -0,0 +1,8 @@
+hornetq.example.logserveroutput=true
+logging.properties=${imported.basedir}/../../src/config/logging.properties
+hornetq.jars.dir=${ENV.JBOSS_HOME}/common/lib
+jars.dir=${ENV.JBOSS_HOME}/lib
+server.default=default
+hornetq.config.dir=hornetq
+jms-library=jboss-javaee.jar
+

Added: branches/Branch_2_1/examples-eap/readme
===================================================================
--- branches/Branch_2_1/examples-eap/readme	                        (rev 0)
+++ branches/Branch_2_1/examples-eap/readme	2010-09-09 06:32:10 UTC (rev 9659)
@@ -0,0 +1 @@
+This directory contains files that will be used to replace files in order to make the examples runnable on the EAP



More information about the hornetq-commits mailing list