Hi all,

I have attached a patch file which provides support for Retroweaver at
compilation time in FOP's ant build script.  You can grab the latest
Retroweaver from
http://downloads.sourceforge.net/retroweaver/retroweaver-2.0.5.zip.  There
is already quite some generics comments which could be easily uncommented in
the FOP source code, so feel free to experiment.

Adrian.

2008/6/5 Jess Holle <[EMAIL PROTECTED]>:

>  I can't speak for the broader market but for my usages anything prior to
> Java 5 is "dead wood" and of no interest.
>
> As of October of this year anything prior to Java 5 will be officially
> unsupported by Sun except where you have a paid support contract with them
> (including that for Solaris).  Add to that the fact that Java 1.4 is so
> limiting for so many things and Java 5 is supported on even the most odd
> ball platforms (except Java ME, but I don't see FOP on ME...)
>
>
> The Web Maestro wrote:
>
> +1 from me on a new poll for discussion.
>
> On Thu, Jun 5, 2008 at 11:56 AM, Jeremias Maerki <[EMAIL PROTECTED]> <[EMAIL 
> PROTECTED]> wrote:
>
>
>  +1 to being cautious about dropping support for Java 1.4 without
> consulting the user base first, i.e. +1 for another user poll, though I
> wouldn't do it before October.
> +1 to putting the users' desires above the developers' desires.
> +1 to moving to Java 1.5 when the time is right.
> -0.5 (no veto) to moving to Java 1.5 before Oct 2008.
> +1 to making experiments with Retroweaver (but please not in Trunk).
>
> On 05.06.2008 17:46:07 Vincent Hennebert wrote:
>
>
>  Hi Guys,
>
> I would like to raise this topic again: what about switching to Java 1.5
> as a minimum requirement?
>
> The End of Life transition period for Java 1.4 will end on the 30th of
> October 2008 [1]. The next version of FOP (after 0.95) will probably not
> have been released by this time, so we could start using 1.5 features in
> the Trunk.
>
> [1] http://java.sun.com/j2se/1.4.2/download.html
>
> I don't particularly expect any disagreement from a developer point of
> vue (who doesn't want to use 1.5 features?), so in the end this will
> probably depend on the users' reactions, but I thought I'd ask for
> opinions here first.
>
> According to the poll Jeremias made in October 2007 [2], only 14.3% of
> the users would think it's a bad idea to switch to 1.5. A year later the
> percentage will probably have further decreased.
>
> [2] http://wiki.apache.org/xmlgraphics/UserPollOct2007
>
> I guess a new poll will still be necessary. Or we could base it on lazy
> consensus: "If you still want Java 1.4 compatibility, speak up now!".
>
> Anyway, even if 1.4 compatibility is still considered to be required,
> there are tools to convert 1.5 code into 1.4 compatible one. I'm mainly
> thinking of Retroweaver:http://retroweaver.sourceforge.net/
> It's BSD licensed, so IIC there wouldn't be any problem to distribute it
> with FOP. Obviously it would be an (optional) compile-time dependency
> only. I haven't personally tested it, but I'm told it's working pretty
> well and it seems to be well maintained. Of course I'd volunteer to
> introduce it into the build system and see how it works. FWIW, it's
> based on the ASM library, that I've had the opportunity to play with
> a few years ago, and what I can say is that it's a really nice, strong,
> lightweight, easy to use library for manipulating class 
> files.http://asm.objectweb.org/
>
> Obviously we wouldn't switch everything to 1.5 immediately. We would do
> it progressively, when fixing bugs or implementing new features. So it
> should be easy to check that the conversion is working properly by
> running the testsuite on a 1.4 jvm, before every commit. Also, we could
> restrain ourselves to features that are directly translatable to 1.4:
> generics, enhanced for loop, autoboxing/unboxing. Most of all we could
> stick to using methods from the Java standard library that are also
> available in the 1.4 version (and, for instance, not use the new
> concurrency package for now).
>
> Just having the possibility to use generics would give us tremendous
> benefits: simpler, cleaner, safer code, more easily understandable, more
> easily maintainable, etc. I can't wait anymore to use those features.
>
> So, WDYT?
> Thanks,
> Vincent
>
>
> --
> Vincent Hennebert                            Anyware 
> Technologieshttp://people.apache.org/~vhennebert 
> <http://people.apache.org/%7Evhennebert>         http://www.anyware-tech.com
> Apache FOP Committer                         FOP Development/Consulting
>
>
>  Jeremias Maerki
>
>
>
>
>
>


-- 

Adrian.
Index: build.properties
===================================================================
--- build.properties	(revision 662228)
+++ build.properties	(working copy)
@@ -11,12 +11,16 @@
 ## All Jars from the optional lib directory are added used for
 ## compilation and JUnit tests. Put your jars for additional
 ## dependencies and tools here.
-# optional.lib.dir = /home/bart/java/lib
+optional.lib.dir = /home/acumiskey/external-libs
 
 ## Checkstyle home directory. This is meant to be the top level of the
 ## checkstyle binary distribution.
 # checkstyle.home.dir = /home/bart/stuff/checkstyle-4.0-beta6
 
+# Retroweaver home directory. This is meant to be the top level of the
+## retroweaver binary distribution
+retroweaver.home.dir = /opt/retroweaver-2.0.5
+
 ## ===================================================================
 ## 2. Switches for common tasks
 
@@ -44,4 +48,4 @@
 
 ## Specify an alternate directory to scan for user supplied
 ## hyphenation pattern files.
-# user.hyph.dir = /home/bart/offo
\ No newline at end of file
+# user.hyph.dir = /home/bart/offo
Index: build.xml
===================================================================
--- build.xml	(revision 662228)
+++ build.xml	(working copy)
@@ -151,8 +151,8 @@
   <property name="javac.debug" value="on"/>
   <property name="javac.optimize" value="off"/>
   <property name="javac.deprecation" value="on"/>
-  <property name="javac.source" value="1.4"/>
-  <property name="javac.target" value="1.4"/>
+  <property name="javac.source" value="1.5"/>
+  <property name="javac.target" value="1.5"/>
   <property name="javac.fork" value="no"/>
 
   <property name="junit.fork" value="on"/>
@@ -508,7 +508,7 @@
     
   </target>
   
-  <target name="compile" depends="compile-java, compile-copy-resources" description="Compiles the source code"/>
+  <target name="compile" depends="compile-java, compile-copy-resources, weave" description="Compiles the source code"/>
 
   <!-- =================================================================== -->
   <!-- compiles hyphenation patterns                                       -->
@@ -1507,5 +1507,26 @@
       </xmlcatalog>
     </xmlvalidate>
   </target>
-  
+
+  <!-- =================================================================== -->
+  <!-- Retroweaver                                                         -->
+  <!-- =================================================================== -->
+  <path id="weave-classpath">
+    <fileset dir="${retroweaver.home.dir}/lib" includes="**/*"/>
+    <fileset dir="${retroweaver.home.dir}/release" includes="retroweaver-all-*"/>
+  </path>
+
+  <target name="weave-avail" depends="init">
+    <available property="weave.available" classname="net.sourceforge.retroweaver.ant.RetroWeaverTask" classpathref="weave-classpath"/>
+  </target>
+
+  <target name="weave" depends="weave-avail">
+    <taskdef name="retroweaver" classname="net.sourceforge.retroweaver.ant.RetroWeaverTask">
+      <classpath>
+        <path refid="weave-classpath"/>
+      </classpath>
+    </taskdef>
+    <retroweaver target="1.4" srcdir="build/classes"/>
+  </target>
+
 </project>

Reply via email to