Okay, here we go...

included is a build.xml file for jonas 2.0  RMI-Version.

It produces nearly the same output as the make-version.

You have to replace the files
  Orb.jpp and RemoteObject.jpp  (in org/objectweb/jonas/common)
with the ones included - so you need no JPP anymore

Install ant, put the build.xml file into a freshly 
extracted jonas_src.tgz */objectweb directory and type ant.
Then you will get a */objectweb/jonas/output directory
almost identical to the one you would get by issuing make
and setting ENV-Variables.
The RMI_jonas.jar generated file works well in my installation.

Are there any other test to run ?

What is missing is 
  * merging the output from jonas and build in a single tree
  * Checking for redundand expanding of the external jars
  * rmic-calls are not checked for dependencies
  * tar-file creation
  * example-directory is simply copied, not filtered and such

What needs to be done
  * buildfile for JEREMIE-Version
  * distinction of NT and UNIX-Version with 
  * JRMIC-Task for the JEREMIE-Version

What could be done better:
  *  Orb.jpp and RemoteObject.jpp don't need to be *.jpp files
     anymore. Could be renamed to *.java and the build.xml 
     slightly modified.

Positiv is
  * no JPP anymore
  * no ENV-Variables
  * the speed: the whole tree is produced in 122 seconds
     (i didn't stop the time of the make-Version, but it was longer)
  * one single file instead of distributed Makefiles
  * platformindepended (not need for Cygnus (?) ;-)
  * mighty tasks, simple syntax, new tasks easy to add

questions, comments, etc. welcome

-- 
markus
 
<project name="jonas2.0_RMI" default="compile" basedir="./">

  <target name="init">
    <property name="jonas" value="jonas" />
    <property name="output" value="${jonas}/output" />
    <property name="src"   value="${jonas}/src" /> 
    <property name="build" value="${jonas}/classes/RMI" />
    <property name="classpath" value="${build}" />
    <filter token="orb_number" value="0" />
    <filter token="unicastremoteobjectimport" value="import 
java.rmi.server.UnicastRemoteObject;" />
    <filter token="SPS" value=":" />
    <filter token="JDBCEXT_CLASSES" value="/usr/local/lib/jdbc2_0-stdext.jar" />
    <filter token="JTA_CLASSES" value="/usr/local/lib/jta-spec1_0_1.jar" />
    <filter token="JNDI_HOME" value="/usr/local" />
    <filter token="EJB11_CLASSES" value="/usr/local/lib/ejb.jar" />
    <filter token="IDB_HOME" value="/usr/local" />
    <filter token="ORACLE_CLASSES" value="/usr/locallib/classes111.zip" />
    <filter token="OBJECTWEB_ORB" value="RMI" />
  </target>

  <target name="prepare" depends="init">
    <mkdir dir="${build}" />
    <mkdir dir="${output}" />
    <mkdir dir="${output}/lib" />
    <expand src="${jonas}/externals/private_jonas.jar" dest="${build}" />
    <expand src="${jonas}/externals/castor.jar" dest="${build}" />
    <expand src="${jonas}/externals/xerces.jar" dest="${build}" />
    <deltree dir="${build}/META-INF" />
  </target>

  <target name="compile" depends="prepare">

    <!--  Replaces the old Java PreProcessor JPP -->
    <copyfile src="${src}/org/objectweb/jonas/common/Orb.jpp" 
dest="${src}/org/objectweb/jonas/common/Orb.java" filtering="on" />
    <copyfile src="${src}/org/objectweb/jonas/common/RemoteObject.jpp" 
dest="${src}/org/objectweb/jonas/common/RemoteObject.java" filtering="on" />


          <!--  Compiling the whole bunch --->
    <javac srcdir="${src}" destdir="${build}" 
excludes="org/objectweb/jonas/rmifilters/Jonas*,bin/"  /> 
    <!-- doing the rmi-twis -->
    <rmic classname="org.objectweb.jonas.jtm.ControlImpl" base="${build}" 
stubVersion="1.1"/>
    <rmic classname="org.objectweb.jonas.jtm.TransactionFactoryImpl" base="${build}" 
stubVersion="1.1"/>
    <rmic classname="org.objectweb.jonas.jtm.SubCoordinator" base="${build}" 
stubVersion="1.1"/>
    <rmic classname="org.objectweb.jonas.adm.Adm" base="${build}" stubVersion="1.1"/>

    <!--- putting it all together -->
    <jar jarfile="${output}/lib/RMI_jonas.jar" basedir="${build}" 
excludes="**/Makefile*" />

    <!--- static and not-so static files -->
    <copydir src="${jonas}" dest="${output}" 
excludes="output/,src/,externals/,CVS/,classes/" />
    <copyfile src="${src}/bin/config.template" dest="${output}/bin/config_env" 
filtering="on" />
    <copyfile src="${src}/bin/newbean.sh" dest="${output}/bin/newbean"  />
    <copyfile src="${src}/bin/registry.sh" dest="${output}/bin/registry"  />
    <copyfile src="${src}/org/objectweb/jonas/adm/JonasAdmin.sh" 
dest="${output}/bin/JonasAdmin.sh" /> 
    <copyfile src="${src}/org/objectweb/jonas/server/EJBServer.sh" 
dest="${output}/bin/EJBServer.sh" /> 
    <copyfile src="${src}/org/objectweb/jonas/server/TMServer.sh" 
dest="${output}/bin/TMServer.sh" /> 
    <copyfile src="${src}/org/objectweb/jonas/tools/GenIC.sh" 
dest="${output}/bin/GenIC.sh" /> 
          <chmod src="${output}/bin/newbean" perm="a+x" />
          <chmod src="${output}/bin/registry" perm="a+x" />
          <chmod src="${output}/bin/JonasAdmin.sh" perm="a+x" />
          <chmod src="${output}/bin/EJBServer.sh" perm="a+x" />
          <chmod src="${output}/bin/TMServer.sh" perm="a+x" />
          <chmod src="${output}/bin/GenIC.sh" perm="a+x" />
  </target>


  <target name="clean" depends="init">
    <delete file="${src}/org/objectweb/jonas/common/Orb.java" />
    <delete file="${src}/org/objectweb/jonas/common/RemoteObject.java" />
    <deltree dir="${output}" />
    <deltree dir="${build}" />
  </target>



</project>

Reply via email to