[jboss-cvs] JBoss Messaging SVN: r7043 - in trunk: examples/common and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue May 26 15:11:37 EDT 2009


Author: ataylor
Date: 2009-05-26 15:11:36 -0400 (Tue, 26 May 2009)
New Revision: 7043

Modified:
   trunk/build-messaging.xml
   trunk/examples/common/build.xml
   trunk/examples/common/config/ant.properties
   trunk/examples/common/src/org/jboss/common/example/JBMExample.java
   trunk/examples/common/src/org/jboss/common/example/SpawnedVMSupport.java
Log:
added client jars and seperated classpath for client and server on classpath

Modified: trunk/build-messaging.xml
===================================================================
--- trunk/build-messaging.xml	2009-05-26 19:08:42 UTC (rev 7042)
+++ trunk/build-messaging.xml	2009-05-26 19:11:36 UTC (rev 7043)
@@ -60,6 +60,7 @@
    <property name="jms.jar.name" value="jbm-jms.jar"/>
    <property name="jms.api.jar.name" value="jbm-jms-api.jar"/>
    <property name="jms.client.jar.name" value="jbm-jms-client.jar"/>
+   <property name="jnp.client.jar.name" value="jnp-client.jar"/>
    <property name="transports.jar.name" value="jbm-transports.jar"/>
    <property name="security.jar.name" value="jbm-jboss-as-security.jar"/>
    <property name="bootstrap.jar.name" value="jbm-bootstrap.jar"/>
@@ -105,6 +106,7 @@
    <property name="build.distro.dir"
              value="${build.dir}/${build.artifact}"/>
    <property name="build.distro.lib.dir" value="${build.distro.dir}/lib"/>
+   <property name="build.distro.client.dir" value="${build.distro.dir}/client"/>
    <property name="build.distro.config.dir" value="${build.distro.dir}/config"/>
    <property name="build.distro.schema.dir" value="${build.distro.dir}/schemas"/>
    <property name="build.distro.bin.dir" value="${build.distro.dir}/bin"/>
@@ -603,7 +605,7 @@
    <!-- ======================================================================================== -->
 
    <target name="jar"
-           depends="jar-core, jar-core-client, jar-jms, jar-jms-client, jar-transports, jar-security, jar-bootstrap, jar-logging, jar-ra, jar-mc, jar-jms-api">
+           depends="jar-core, jar-core-client, jar-jms, jar-jms-client, jar-transports, jar-security, jar-bootstrap, jar-logging, jar-ra, jar-mc, jar-jms-api, jar-jnp-client">
    </target>
    
    <target name="jar-jms-api" depends="init">
@@ -612,7 +614,17 @@
             <include name="javax/jms/**/*.class"/>
          </zipfileset>	     
       </jar>         
-   </target>   
+   </target>
+
+   <target name="jar-jnp-client" depends="init">
+      <jar jarfile="${build.jars.dir}/${jnp.client.jar.name}">
+         <zipfileset src="${jboss.jnpserver.lib}/jnpserver.jar">
+            <include name="org/jnp/interfaces/**/*.class"/>
+            <include name="org/jboss/naming/**/*.class"/>
+            <include name="org/jnp/server/NamingServer_Stub.class"/>
+         </zipfileset>
+      </jar>
+   </target>
    
    <target name="jar-mc" depends="init">
       <jar jarfile="${build.jars.dir}/${mc.jar.name}">
@@ -748,6 +760,7 @@
       
       <mkdir dir="${build.distro.dir}"/>
       <mkdir dir="${build.distro.lib.dir}"/>
+      <mkdir dir="${build.distro.client.dir}"/>
       <mkdir dir="${build.distro.config.dir}"/>
       <mkdir dir="${build.distro.bin.dir}"/>
       <mkdir dir="${build.distro.api.dir}"/>
@@ -761,8 +774,6 @@
             <include name="${security.jar.name}"/>
             <include name="${bootstrap.jar.name}"/>
             <include name="${logging.jar.name}"/>
-            <include name="${core.client.jar.name}"/>
-            <include name="${jms.client.jar.name}"/>
             <include name="${mc.jar.name}"/>
             <include name="${ra.rar.name}"/>
             <include name="${jms.api.jar.name}"/>
@@ -832,7 +843,13 @@
             <include name="${netty.jar.name}"/>
          </fileset>
       </copy>
-
+      <copy todir="${build.distro.client.dir}">
+         <fileset dir="${build.jars.dir}">
+            <include name="${core.client.jar.name}"/>
+            <include name="${jms.client.jar.name}"/>
+            <include name="${jnp.client.jar.name}"/>
+         </fileset>
+      </copy>
       <copy todir="${build.distro.config.dir}">
          <fileset dir="${src.config.dir}">
             <include name="*.xml"/>
@@ -937,11 +954,6 @@
           <include name="**"/>
        </fileset>
     </copy>
-    <copy todir="${build.distro.dir}/docs/reference-guide">
-       <fileset dir="${reference-guide.build.dir}">
-          <include name="**"/>
-       </fileset>
-    </copy>
     <antcall target="javadoc"/>
     <copy todir="${build.distro.api.dir}/">
        <fileset dir="${build.api.dir}">
@@ -955,7 +967,6 @@
       <ant dir="./docs/user-manual" antfile="build.xml" target="all"/>
       <ant dir="./docs/quickstart-guide" antfile="build.xml" target="all"/>
       <ant dir="./docs/migration-guide" antfile="build.xml" target="all"/>
-      <ant dir="./docs/reference-guide" antfile="build.xml" target="all"/>
     </target>
 
    <target name="javadoc">

Modified: trunk/examples/common/build.xml
===================================================================
--- trunk/examples/common/build.xml	2009-05-26 19:08:42 UTC (rev 7042)
+++ trunk/examples/common/build.xml	2009-05-26 19:11:36 UTC (rev 7043)
@@ -69,22 +69,37 @@
       <path refid="extra.classpath"/>
    </path>
 
-   <path id="runtime.classpath">
+   <path id="client.classpath">
       <path refid="compilation.classpath"/>
       <pathelement location="${config.dir}"/>
       <pathelement location="${example.config.dir}"/>
       <pathelement location="${classes.dir}"/>
+      <fileset dir="${client.jars.dir}">
+         <include name="**/*client*.jar"/>
+      </fileset>
+      <fileset dir="${jars.dir}">
+         <include name="apache-log4j/lib/log4j.jar"/>
+         <include name="netty/lib/netty-3.1.0.BETA1.jar"/>
+      </fileset>
+   </path>
+
+   <path id="server.classpath">
+      <path refid="compilation.classpath"/>
+      <pathelement location="${config.dir}"/>
+      <pathelement location="${example.config.dir}"/>
+      <pathelement location="${classes.dir}"/>
       <path refid="extra.classpath"/>
       <fileset dir="${jars.dir}">
-         <include name="jboss/jboss-javaee/lib/jboss-javaee.jar"/>         
+         <include name="jboss/jboss-javaee/lib/jboss-javaee.jar"/>
       </fileset>
       <fileset dir="${jars.dir}">
-         <include name="apache-log4j/lib/log4j.jar"/>       
-         <include name="jboss/jnpserver/lib/jnpserver.jar"/>         
+         <include name="apache-log4j/lib/log4j.jar"/>
+         <include name="jboss/jnpserver/lib/jnpserver.jar"/>
          <include name="netty/lib/netty-3.1.0.BETA1.jar"/>
-      </fileset>    
+      </fileset>
    </path>
- 
+
+
    <target name="init">
       <mkdir dir="${build.dir}"/>
       <mkdir dir="${classes.dir}"/>
@@ -113,6 +128,8 @@
 
 
    <target name="runExample" depends="compile">
+
+      <property name="serverclasspath" refid="server.classpath"/>
  	   <property name="java-min-memory" value="512M"/>
  	   <property name="java-max-memory" value="2048M"/>
       <java classname="${example.classname}" fork="true" resultproperty="example-result">
@@ -130,8 +147,9 @@
          <jvmarg value="-Djbm.example.runServer=${jbm.example.runServer}"/>
          <jvmarg value="-Djbm.example.logserveroutput=${jbm.example.logserveroutput}"/>
          <!--<jvmarg line="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"/>-->
+         <jvmarg value="-Djbm.example.server.classpath=${serverclasspath}"/>
          <arg line="${jbm.example.beans.file}"/>
-         <classpath refid="runtime.classpath"/>
+         <classpath refid="client.classpath"/>
       </java>
       <!-- if the example exited with a result value != 0, we fail the build -->
       <fail message="Example ${example.classname} failed">

Modified: trunk/examples/common/config/ant.properties
===================================================================
--- trunk/examples/common/config/ant.properties	2009-05-26 19:08:42 UTC (rev 7042)
+++ trunk/examples/common/config/ant.properties	2009-05-26 19:11:36 UTC (rev 7043)
@@ -2,4 +2,5 @@
 logging.properties=${imported.basedir}/../../src/config/stand-alone/non-clustered/logging.properties
 jbm.jars.dir=${imported.basedir}/../../build/jars
 jars.dir=${imported.basedir}/../../thirdparty
-aio.library.path=${imported.basedir}/../../native/bin
\ No newline at end of file
+client.jars.dir=${imported.basedir}/../../build/jars
+aio.library.path=${imported.basedir}/../../native/bin

Modified: trunk/examples/common/src/org/jboss/common/example/JBMExample.java
===================================================================
--- trunk/examples/common/src/org/jboss/common/example/JBMExample.java	2009-05-26 19:08:42 UTC (rev 7042)
+++ trunk/examples/common/src/org/jboss/common/example/JBMExample.java	2009-05-26 19:11:36 UTC (rev 7043)
@@ -44,6 +44,8 @@
 
    private boolean failure = false;
 
+   private String serverClasspath;
+
    public abstract boolean runExample() throws Exception;
    
    private boolean logServerOutput;
@@ -62,6 +64,7 @@
    {
       String runServerProp = System.getProperty("jbm.example.runServer");
       String logServerOutputProp = System.getProperty("jbm.example.logserveroutput");
+      serverClasspath = System.getProperty("jbm.example.server.classpath");
       boolean runServer = runServerProp == null ? true : Boolean.valueOf(runServerProp);
       logServerOutput = logServerOutputProp == null?false:Boolean.valueOf(logServerOutputProp);
       log.info("jbm.example.runServer is " + runServer);
@@ -123,7 +126,7 @@
 
    protected void run(String[] args)
    {
-      run(defaultArgs, args);
+      run( defaultArgs, args);
    }
 
    protected void killServer(int id) throws Exception
@@ -182,6 +185,7 @@
       }
       log.info("and vm args: " + args.toString());
       servers[index] = SpawnedVMSupport.spawnVM(
+            serverClasspath,
             SpawnedJBMServer.class.getName(),
             allVMArgs,
             logServerOutput,

Modified: trunk/examples/common/src/org/jboss/common/example/SpawnedVMSupport.java
===================================================================
--- trunk/examples/common/src/org/jboss/common/example/SpawnedVMSupport.java	2009-05-26 19:08:42 UTC (rev 7042)
+++ trunk/examples/common/src/org/jboss/common/example/SpawnedVMSupport.java	2009-05-26 19:11:36 UTC (rev 7043)
@@ -48,19 +48,6 @@
 
    // Static --------------------------------------------------------
 
-   public static Process spawnVM(final String className,
-                                 final String[] vmargs,
-                                 final boolean logOutput,
-                                 final String success,
-                                 final String failure,
-                                 final String configDir,
-                                 final String... args) throws Exception
-   {
-      String classPath = System.getProperty("java.class.path");
-      
-      return spawnVM(classPath, className, vmargs, logOutput, success, failure, configDir, args);
-   }
-
    public static Process spawnVM(String classPath,
                                  final String className,
                                  final String[] vmargs,




More information about the jboss-cvs-commits mailing list