Thread: build.xml patch

build.xml patch

From
mike beachy
Date:
I've included a small patch for build.xml.

The scenario that it fixes:

Knowing that the dev code has a lot of bug fixes not present in the
standard releases, J Random User checks out cvs code, goes directly to
src/interfaces/jdbc and types 'ant'. User then gets compile errors due
to ${major} and ${minor} not being filtered during the creation of
Driver.java. After reading the README (a bit out of order, but who can
say they haven't done similar things) he then tries configuring and
running make. Unfortunately, this also fails because once Driver.java is
created, it's never overwritten.

I'm not sure that overwriting Driver.java is a good thing, but checking
for defined major and minor definitely is.

-mike


Index: build.xml
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/build.xml,v
retrieving revision 1.29
diff -c -r1.29 build.xml
*** build.xml    2002/09/25 07:01:30    1.29
--- build.xml    2002/09/27 21:19:17
***************
*** 156,165 ****
--- 156,169 ----
      <filter token="JDBCCONNECTCLASS" value="${connectclass}" />
      <filter token="DEF_PGPORT" value="${def_pgport}" />

+     <fail unless="major" message="'major' undefined. Please follow the directions in README."/>
+     <fail unless="minor" message="'minor' undefined. Please follow the directions in README."/>
+
      <!-- Put a check for the current version here -->

      <!-- now copy and filter the file -->
      <copy file="${package}/Driver.java.in"
+           overwrite="true"
            tofile="${package}/Driver.java"
            filtering="yes" />

Re: build.xml patch

From
Barry Lind
Date:
Patch applied.

--Barry


mike beachy wrote:
> I've included a small patch for build.xml.
>
> The scenario that it fixes:
>
> Knowing that the dev code has a lot of bug fixes not present in the
> standard releases, J Random User checks out cvs code, goes directly to
> src/interfaces/jdbc and types 'ant'. User then gets compile errors due
> to ${major} and ${minor} not being filtered during the creation of
> Driver.java. After reading the README (a bit out of order, but who can
> say they haven't done similar things) he then tries configuring and
> running make. Unfortunately, this also fails because once Driver.java is
> created, it's never overwritten.
>
> I'm not sure that overwriting Driver.java is a good thing, but checking
> for defined major and minor definitely is.
>
> -mike
>
>
> Index: build.xml
> ===================================================================
> RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/build.xml,v
> retrieving revision 1.29
> diff -c -r1.29 build.xml
> *** build.xml    2002/09/25 07:01:30    1.29
> --- build.xml    2002/09/27 21:19:17
> ***************
> *** 156,165 ****
> --- 156,169 ----
>       <filter token="JDBCCONNECTCLASS" value="${connectclass}" />
>       <filter token="DEF_PGPORT" value="${def_pgport}" />
>
> +     <fail unless="major" message="'major' undefined. Please follow the directions in README."/>
> +     <fail unless="minor" message="'minor' undefined. Please follow the directions in README."/>
> +
>       <!-- Put a check for the current version here -->
>
>       <!-- now copy and filter the file -->
>       <copy file="${package}/Driver.java.in"
> +           overwrite="true"
>             tofile="${package}/Driver.java"
>             filtering="yes" />
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>



Re: build.xml patch

From
Kris Jurka
Date:
What about a developer who wants to run "ant test"?

On Sat, 19 Oct 2002, Barry Lind wrote:

> Patch applied.
>
> --Barry
>
>
> mike beachy wrote:
> > I've included a small patch for build.xml.
> >
> > The scenario that it fixes:
> >
> > Knowing that the dev code has a lot of bug fixes not present in the
> > standard releases, J Random User checks out cvs code, goes directly to
> > src/interfaces/jdbc and types 'ant'. User then gets compile errors due
> > to ${major} and ${minor} not being filtered during the creation of
> > Driver.java. After reading the README (a bit out of order, but who can
> > say they haven't done similar things) he then tries configuring and
> > running make. Unfortunately, this also fails because once Driver.java is
> > created, it's never overwritten.
> >
> > I'm not sure that overwriting Driver.java is a good thing, but checking
> > for defined major and minor definitely is.
> >
> > -mike
> >
> >
> > Index: build.xml
> > ===================================================================
> > RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/build.xml,v
> > retrieving revision 1.29
> > diff -c -r1.29 build.xml
> > *** build.xml    2002/09/25 07:01:30    1.29
> > --- build.xml    2002/09/27 21:19:17
> > ***************
> > *** 156,165 ****
> > --- 156,169 ----
> >       <filter token="JDBCCONNECTCLASS" value="${connectclass}" />
> >       <filter token="DEF_PGPORT" value="${def_pgport}" />
> >
> > +     <fail unless="major" message="'major' undefined. Please follow the directions in README."/>
> > +     <fail unless="minor" message="'minor' undefined. Please follow the directions in README."/>
> > +
> >       <!-- Put a check for the current version here -->
> >
> >       <!-- now copy and filter the file -->
> >       <copy file="${package}/Driver.java.in"
> > +           overwrite="true"
> >             tofile="${package}/Driver.java"
> >             filtering="yes" />
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> >
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>


Re: build.xml patch

From
Kris Jurka
Date:

What I mean by this is that previously after one run of make, the user
could run any number of ant commands because the Driver.java file was
never overwritten.  Perhaps the solution to this is simply to add test
target in the Makefile which calls the ant test with the other parameters
as well.

Kris Jurka

On Tue, 22 Oct 2002, Kris Jurka wrote:

>
> What about a developer who wants to run "ant test"?
>
> On Sat, 19 Oct 2002, Barry Lind wrote:
>
> > Patch applied.
> >
> > --Barry
> >
> >
> > mike beachy wrote:
> > > I've included a small patch for build.xml.
> > >
> > > The scenario that it fixes:
> > >
> > > Knowing that the dev code has a lot of bug fixes not present in the
> > > standard releases, J Random User checks out cvs code, goes directly to
> > > src/interfaces/jdbc and types 'ant'. User then gets compile errors due
> > > to ${major} and ${minor} not being filtered during the creation of
> > > Driver.java. After reading the README (a bit out of order, but who can
> > > say they haven't done similar things) he then tries configuring and
> > > running make. Unfortunately, this also fails because once Driver.java is
> > > created, it's never overwritten.
> > >
> > > I'm not sure that overwriting Driver.java is a good thing, but checking
> > > for defined major and minor definitely is.
> > >
> > > -mike
> > >
> > >
> > > Index: build.xml
> > > ===================================================================
> > > RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/build.xml,v
> > > retrieving revision 1.29
> > > diff -c -r1.29 build.xml
> > > *** build.xml    2002/09/25 07:01:30    1.29
> > > --- build.xml    2002/09/27 21:19:17
> > > ***************
> > > *** 156,165 ****
> > > --- 156,169 ----
> > >       <filter token="JDBCCONNECTCLASS" value="${connectclass}" />
> > >       <filter token="DEF_PGPORT" value="${def_pgport}" />
> > >
> > > +     <fail unless="major" message="'major' undefined. Please follow the directions in README."/>
> > > +     <fail unless="minor" message="'minor' undefined. Please follow the directions in README."/>
> > > +
> > >       <!-- Put a check for the current version here -->
> > >
> > >       <!-- now copy and filter the file -->
> > >       <copy file="${package}/Driver.java.in"
> > > +           overwrite="true"
> > >             tofile="${package}/Driver.java"
> > >             filtering="yes" />
> > >
> > > ---------------------------(end of broadcast)---------------------------
> > > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> > >
> >
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 3: if posting/reading through Usenet, please send an appropriate
> > subscribe-nomail command to majordomo@postgresql.org so that your
> > message can get through to the mailing list cleanly
> >
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>


Re: build.xml patch

From
Kris Jurka
Date:

I have just found the make check target and will now cease this chain of
emails replying to myself.

On Tue, 22 Oct 2002, Kris Jurka wrote:

>
>
> What I mean by this is that previously after one run of make, the user
> could run any number of ant commands because the Driver.java file was
> never overwritten.  Perhaps the solution to this is simply to add test
> target in the Makefile which calls the ant test with the other parameters
> as well.
>
> Kris Jurka
>
> On Tue, 22 Oct 2002, Kris Jurka wrote:
>
> >
> > What about a developer who wants to run "ant test"?
> >
> > On Sat, 19 Oct 2002, Barry Lind wrote:
> >
> > > Patch applied.
> > >
> > > --Barry
> > >
> > >
> > > mike beachy wrote:
> > > > I've included a small patch for build.xml.
> > > >
> > > > The scenario that it fixes:
> > > >
> > > > Knowing that the dev code has a lot of bug fixes not present in the
> > > > standard releases, J Random User checks out cvs code, goes directly to
> > > > src/interfaces/jdbc and types 'ant'. User then gets compile errors due
> > > > to ${major} and ${minor} not being filtered during the creation of
> > > > Driver.java. After reading the README (a bit out of order, but who can
> > > > say they haven't done similar things) he then tries configuring and
> > > > running make. Unfortunately, this also fails because once Driver.java is
> > > > created, it's never overwritten.
> > > >
> > > > I'm not sure that overwriting Driver.java is a good thing, but checking
> > > > for defined major and minor definitely is.
> > > >
> > > > -mike
> > > >
> > > >
> > > > Index: build.xml
> > > > ===================================================================
> > > > RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/build.xml,v
> > > > retrieving revision 1.29
> > > > diff -c -r1.29 build.xml
> > > > *** build.xml    2002/09/25 07:01:30    1.29
> > > > --- build.xml    2002/09/27 21:19:17
> > > > ***************
> > > > *** 156,165 ****
> > > > --- 156,169 ----
> > > >       <filter token="JDBCCONNECTCLASS" value="${connectclass}" />
> > > >       <filter token="DEF_PGPORT" value="${def_pgport}" />
> > > >
> > > > +     <fail unless="major" message="'major' undefined. Please follow the directions in README."/>
> > > > +     <fail unless="minor" message="'minor' undefined. Please follow the directions in README."/>
> > > > +
> > > >       <!-- Put a check for the current version here -->
> > > >
> > > >       <!-- now copy and filter the file -->
> > > >       <copy file="${package}/Driver.java.in"
> > > > +           overwrite="true"
> > > >             tofile="${package}/Driver.java"
> > > >             filtering="yes" />
> > > >
> > > > ---------------------------(end of broadcast)---------------------------
> > > > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> > > >
> > >
> > >
> > >
> > > ---------------------------(end of broadcast)---------------------------
> > > TIP 3: if posting/reading through Usenet, please send an appropriate
> > > subscribe-nomail command to majordomo@postgresql.org so that your
> > > message can get through to the mailing list cleanly
> > >
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 4: Don't 'kill -9' the postmaster
> >
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>