[jboss-cvs] JBossCache ...

Galder Zamarreno galder.zamarreno at jboss.com
Wed Mar 7 18:32:05 EST 2007


  User: gzamarreno
  Date: 07/03/07 18:32:05

  Modified:    JBossCache  build.xml
  Log:
  [JBCACHE-964] Work committed:
  - Transforming Cache Loaders implemented and unit tests provided
  - migration folder structure. See JIRA.
  - build.xml modified to compile, jar, create manifest for migration jar
  and also added examples and migration jar to distros.
  - example created and tested; it includes readme.txt with details of the
  example and how to run it.
  Still TODO:
  - Unit tests for transforming cache loaders need to run from build.xml
  - Documentation for transforming cache loaders in users guide, what are
  they, when to use them,...etc.
  - Fix JBCACHE-877 that occurrs when unzipping JBossCache-core-2.0.0.BETA2.zip 
  and running the examples. Workaround is to bring trove.jar into its lib.
  - Get examples/cacheloader-migration/build.sh working
  - Move JDBCCacheLoaderOld to the migration side. It's not that straightforward due to classes in
  /src having dependencies on it. Needs further study.
  
  Revision  Changes    Path
  1.189     +86 -4     JBossCache/build.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: build.xml
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/build.xml,v
  retrieving revision 1.188
  retrieving revision 1.189
  diff -u -b -r1.188 -r1.189
  --- build.xml	6 Mar 2007 20:12:05 -0000	1.188
  +++ build.xml	7 Mar 2007 23:32:04 -0000	1.189
  @@ -1,6 +1,6 @@
   <?xml version="1.0" encoding="UTF-8"?>
   
  -<!-- $Id: build.xml,v 1.188 2007/03/06 20:12:05 msurtani Exp $ -->
  +<!-- $Id: build.xml,v 1.189 2007/03/07 23:32:04 gzamarreno Exp $ -->
   
   <project default="compile" name="JBossCache">
   
  @@ -50,6 +50,15 @@
      <property name="junit.jvm.options" value="-Ddummy"/>
      <property name="ant.dir" value="${root.dir}/ant-dist"/>
      <property name="manifest.file" value="${dist.lib}/default.mf"/>
  +   <property name="migration.dir" value="${root.dir}/migration" />
  +   <property name="migration.src.dir" value="${migration.dir}/src" />
  +   <property name="migration.lib.dir" value="${migration.dir}/lib" />
  +   <property name="migration.output.dir" value="${migration.dir}/output"/>
  +   <property name="migration.compile.dir" value="${migration.output.dir}/classes"/>
  +   <property name="migration.compiletest.dir" value="${migration.output.dir}/test-classes"/>
  +   <property name="migration.examples.dir" value="${migration.dir}/examples"/>
  +   <property name="migration.jar.name" value="jbosscache-cacheloader-migration.jar"/>
  +   <property name="migration.manifest.file" value="${dist.lib}/migration.default.mf"/>
      <!-- -->
      <condition property="ENABLE_COMPAT_TESTS">
         <or>
  @@ -122,6 +131,12 @@
         </fileset>
      </path>
   
  +   <path id="migration.library.classpath">
  +      <fileset dir="${migration.lib.dir}">
  +         <include name="*.jar"/>
  +      </fileset>
  +   </path>
  +
      <path id="output.classpath">
         <pathelement location="${compile.dir}"/>
         <pathelement location="${output.etc.dir}"/>
  @@ -163,10 +178,21 @@
         <pathelement location="${compiletest.dir}"/>
      </path>
   
  +   <path id="migration.classpath">
  +      <fileset dir="${lib.dir}">
  +         <include name="*.jar"/>
  +      </fileset>
  +      <fileset dir="${migration.lib.dir}">
  +         <include name="*.jar"/>
  +      </fileset>
  +      <pathelement location="${compile.dir}"/>
  +      <pathelement location="${migration.compile.dir}"/>
  +   </path>
  +
      <!-- ================================================================== -->
      <!-- Compile                                                            -->
      <!-- ================================================================== -->
  -   <target name="compile" depends="compile-cache, compile-pojocache" description="Compiles all Java files">
  +   <target name="compile" depends="compile-cache, compile-pojocache, compile-migration" description="Compiles all Java files">
      </target>
   
      <target name="compile-cache" description="Compiles all Java files">
  @@ -310,10 +336,29 @@
   
      </target>
   
  +   <target name="compile-migration" description="Compiles migration Java files">
  +      <mkdir dir="${migration.compile.dir}"/>
  +      <mkdir dir="${migration.compiletest.dir}"/>
  +
  +      <!-- compile JBossCache Java code -->
  +      <javac destdir="${migration.compile.dir}"
  +             debug="on"
  +             deprecation="${deprecation}"
  +             optimize="off"
  +             includes="**/*.java"
  +             target="1.5"
  +             source="1.5"
  +             failonerror="true">
  +         <src path="${migration.src.dir}"/>
  +         <classpath refid="migration.classpath"/>
  +      </javac>
  +
  +   </target>
  +
      <!-- ================================================================== -->
      <!-- Create jbosscache.jar                                             -->
      <!-- ================================================================== -->
  -   <target name="jar" description="Builds jbosscache.jar" depends="compile, manifest, jar-cache, jar-pojocache">
  +   <target name="jar" description="Builds jbosscache.jar" depends="compile, manifest, jar-cache, jar-pojocache, jar-migration">
      </target>
   
      <target name="jar-retro" description="Builds JDK 1.4.0-compatible jbosscache.jar"
  @@ -360,6 +405,21 @@
         <delete file="${manifest.file}"/>
      </target>
   
  +   <target name="jar-migration" depends="compile-cache, compile-migration, manifest-migration" description="Builds cache loader migration library, ${migration.jar.name}">
  +      <mkdir dir="${dist.lib}"/>
  +      <jar jarfile="${dist.lib}/${migration.jar.name}" manifest="${manifest.file}">
  +         <fileset dir="${migration.compile.dir}">
  +            <include name="org/jboss/cache/**"/>
  +         </fileset>
  +         <fileset dir="${etc.dir}">
  +            <include name="${dependencies}"/>
  +         </fileset>
  +         <zipfileset src="${migration.lib.dir}/jboss-minimal.jar" />
  +         <zipfileset src="${retro.lib.dir}/jboss-logging-spi.jar"/>
  +      </jar>
  +      <delete file="${manifest.file}"/>      
  +   </target>
  +
      <target name="manifest">
         <tstamp/>
         <mkdir dir="${dist.lib}"/>
  @@ -408,6 +468,22 @@
         </manifest>
      </target>
   
  +   <target name="manifest-migration">
  +      <tstamp/>
  +      <mkdir dir="${dist.lib}"/>
  +      <manifest file="${manifest.file}">
  +         <attribute name="Built-By" value="${user.name}"/>
  +         <attribute name="Created-On" value="${TODAY}"/>
  +         <!-- attribute name="Main-Class" value="org.jboss.cache.Version"/ -->
  +         <attribute name="Specification-Title" value="JBossCache-Cacheloader-Migration"/>
  +         <attribute name="Specification-Version" value="${module.version}"/>
  +         <attribute name="Specification-Vendor" value="JBoss Inc."/>
  +         <attribute name="Implementation-Title" value="${module.name}"/>
  +         <attribute name="Implementation-Version" value="${module.version}"/>
  +         <attribute name="Implementation-Vendor" value="JBoss Inc."/>
  +         <attribute name="Class-Path" value="jboss-minimal.jar"/>
  +      </manifest>
  +   </target>
   
      <!-- ================================================================== -->
      <!-- Documentation                                                      -->
  @@ -1183,6 +1259,9 @@
               <!-- Exclude this for now -->
               <exclude name="**/article/**"/>
            </fileset>
  +         <fileset dir="${migration.examples.dir}">
  +            <include name="**"/>
  +         </fileset>
         </copy>
   
         <copy todir="${tmp.dir}/lib" filtering="no">
  @@ -1193,6 +1272,7 @@
            <fileset dir="${dist.lib}">
               <include name="jbosscache.jar"/>
               <include name="pojocache.jar"/>
  +            <include name="${migration.jar.name}"/>
            </fileset>
         </copy>
   
  @@ -1258,6 +1338,7 @@
            <zipfileset dir="${tmp.dir}" prefix="${module.name}-core-${module.version}" filemode="755">
               <include name="**/*"/>
               <include name="org/jboss/cache/**"/>
  +            <include name="examples/cacheloader-migration/**"/>
               <exclude name="org/jboss/cache/pojo/**"/>
               <exclude name="src/**"/>
               <exclude name="pojocache*"/>
  @@ -1266,7 +1347,7 @@
               <exclude name="lib/trove.jar"/>
               <exclude name="lib/qdox.jar"/>
               <exclude name="lib/javassist.jar"/>
  -            <exclude name="examples/**"/>
  +            <exclude name="examples/PojoCache/**"/>
               <exclude name="resources/**"/>
               <exclude name="docs/javadoc/**"/>
               <exclude name="docs/PojoCache/**"/>
  @@ -1281,6 +1362,7 @@
            <zipfileset dir="${tmp.dir}" prefix="${module.name}-pojo-${module.version}" filemode="755">
               <exclude name="src/**"/>
               <exclude name="examples/annotated14/**"/>
  +            <exclude name="examples/cacheloader-migration/**"/>
            </zipfileset>
         </zip>
   
  
  
  



More information about the jboss-cvs-commits mailing list