Re: patch: fix 'compile' target to do correct dependency checking - Mailing list pgsql-jdbc

From Barry Lind
Subject Re: patch: fix 'compile' target to do correct dependency checking
Date
Msg-id 3F4937FA.9040507@xythos.com
Whole thread Raw
In response to patch: fix 'compile' target to do correct dependency checking  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-jdbc
Patch applied and tested against jdk1.2 and 1.3.

thanks,
--Barry


Oliver Jowett wrote:
> This patch ensures that the 'compile' target includes all the source files
> needed for the build so that Ant's dependency checking works correctly.
> I've only tested against JDK1.4 / JDBC3 but it should work for other builds
> (all going well).
>
> Without this patch, only the jdbcN subpackage corresponding to the exact
> JDBC version the driver is configured for is included in the source file
> set. Changes to abstract classes in other subpackages (for example,
> jdbc1.AbstractJdbc1Statement with a JDBC2 or JDBC3 build) will be missed by
> ant's dependency check and the classes may not be rebuilt.
>
> This only bites dependency checking, not clean builds, as the "missing"
> source files are automatically located and built by the compiler when
> referenced by other, included, classes.
>
> -O
>
>
> ------------------------------------------------------------------------
>
> Index: src/interfaces/jdbc/build.xml
> ===================================================================
> RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/build.xml,v
> retrieving revision 1.35
> diff -u -c -r1.35 build.xml
> *** src/interfaces/jdbc/build.xml    11 Aug 2003 23:42:04 -0000    1.35
> --- src/interfaces/jdbc/build.xml    17 Aug 2003 01:27:39 -0000
> ***************
> *** 108,126 ****
>     </target>
>
>
> -   <!-- This is the core of the driver.  It is common for all three versions. -->
>     <target name="compile" depends="prepare,check_versions,driver">
>       <javac srcdir="${srcdir}" destdir="${builddir}" debug="${debug}">
> !       <include name="${package}/**" />
>
> !       <exclude name="${package}/jdbc1/**" unless="jdbc1"/>
> !       <exclude name="${package}/jdbc2/**" unless="jdbc2"/>
> !       <exclude name="${package}/jdbc3/**" unless="jdbc3"/>
>
> !       <exclude name="${package}/jdbc2/optional/**" unless="jdbc2" />
> !       <exclude name="${package}/jdbc2/optional/**" unless="datasource" />
>
> !       <exclude name="${package}/test/**"/>
>       </javac>
>     </target>
>
> --- 108,147 ----
>     </target>
>
>
>     <target name="compile" depends="prepare,check_versions,driver">
>       <javac srcdir="${srcdir}" destdir="${builddir}" debug="${debug}">
> !       <!-- This is the core of the driver.  It is common for all versions. -->
> !       <include name="${package}/*.java" />
> !       <include name="${package}/core/**" />
> !       <include name="${package}/fastpath/**" />
> !       <include name="${package}/geometric/**" />
> !       <include name="${package}/largeobject/**" />
> !       <include name="${package}/util/**" />
>
> !       <!--
> !       Each jdbcN subpackage is used only if the driver supports *at least* that
> !       revision of JDBC. That is, a JDBC1 build uses only jdbc1, a JDBC2 build
> !       uses both jdbc1 and jdbc2, etc.
>
> !       Within those subpackages, classes beginning with "JdbcN" are assumed to be
> !       the concrete implementations for JDBC version N and are built only if the
> !       driver supports *exactly* that version. For example, jdbc1/Jdbc1Statement.java
> !       is built only if the driver build is a JDBC1 build.
> !       -->
>
> !       <!-- jdbc1 subpackage -->
> !       <include name="${package}/jdbc1/**"/>
> !       <exclude name="${package}/jdbc1/Jdbc1*.java" unless="jdbc1"/>
> !
> !       <!-- jdbc2 subpackage -->
> !       <include name="${package}/jdbc2/**" if="jdbc2"/>
> !       <include name="${package}/jdbc2/**" if="jdbc3"/>
> !       <exclude name="${package}/jdbc2/Jdbc2*.java" unless="jdbc2"/>
> !       <exclude name="${package}/jdbc2/optional/**" unless="datasource"/>
> !
> !       <!-- jdbc3 subpackage -->
> !       <include name="${package}/jdbc3/*.java" if="jdbc3"/>
> !       <exclude name="${package}/jdbc3/Jdbc3*.java" unless="jdbc3"/>
>       </javac>
>     </target>
>
>
>
> ------------------------------------------------------------------------
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match



pgsql-jdbc by date:

Previous
From: Barry Lind
Date:
Subject: Re: [BUGS] Bug #926: if old postgresql.jar in CLASSPATH,
Next
From: Barry Lind
Date:
Subject: Re: SetMaxFieldSize