I've got a solution for the problem that the current mmbase source distro
currently does not build under java 1.4 without (tedious) human
intervention. The following ant snippet will fix the offending files. It's
only one way (1.3 -> 1.4, not the other way around) and it's not very future
proof (it might break if the source files are changed), but still it's an
improvement over manually hacking the source to get it working. 

    <!-- Make compilable for java 1.4 -->
    <replaceregexp flags="g"
                   match="//\W+return" replace="return">
      <fileset dir="${mmbase.src}/src/org/mmbase/module/database"
includes="MultiConnection.java,MultiStatement.java"/>
    </replaceregexp>
    <replaceregexp
file="${mmbase.src}/src/org/mmbase/module/database/MultiConnection.java"
flags="g"
                   match="//\W+con" replace="con"/>
    <replace
file="${mmbase.src}/src/org/mmbase/module/database/MultiConnection.java"
token="private class Savepoint" value="static"/>
    <replace
file="${mmbase.src}/src/org/mmbase/module/database/MultiConnection.java"
token="throw new Unsupported" value="// throw new Unsupported"/>
    <replace
file="${mmbase.src}/src/org/mmbase/module/database/MultiStatement.java"
token="throw new Unsupported" value="// throw new Unsupported"/>


Cheers, Michiel de Mare.
Finalist IT Group.

Reply via email to