RE: Ant Packaging - Was: building pgsql-interfaces.. .

From: Peter Mount <petermount(at)maidstone(dot)gov(dot)uk>
To: "'Mark Dzmura'" <mdz(at)digital-mission(dot)com>, pgsql-interfaces(at)postgresql(dot)org
Subject: RE: Ant Packaging - Was: building pgsql-interfaces.. .
Date: 2000-10-20 07:38:40
Message-ID: 1B3D5E532D18D311861A00600865478CF1B456@exchange1.nt.maidstone.gov.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

See comments below prefixes with PM:

(boy do I hate outlook ;-) )

--
Peter Mount
Enterprise Support Officer, Maidstone Borough Council
Email: petermount(at)maidstone(dot)gov(dot)uk
WWW: http://www.maidstone.gov.uk
All views expressed within this email are not the views of Maidstone Borough
Council

-----Original Message-----
From: Mark Dzmura [mailto:mdz(at)digital-mission(dot)com]
Sent: Thursday, October 19, 2000 7:31 PM
To: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] Ant Packaging - Was: building
pgsql-interfaces...

Peter Mount wrote:

> On Tue, 17 Oct 2000, Christopher Cain wrote:
>
> > For what it's worth, I am very much in favor of migrating to Ant. Having
worked
> > with it in other packages, I have found it to be an order of magnitude
better
> > than Make for Java software. As mentioned, it is cleaner and much easier
to
> > work with than makefiles. Of course, I can say all of this because
unlike like
> > Peter, I have no idea what any of the complications are :-)
>
> There's three complications really.
>
> 1: We need to get the current version number out of the source. This is
> used by DatabaseMetaData for some methods, and the current official way is
> to get it out of Makefile.global. However, this is only in existence after
> configure is run on the main source tree.
>
> Prior to 7.1, this was done manually, and as there was several places to
> do it, it was easily, and regularly missed.

Ant is typically invoked by a "build.sh" bash script (under Unix/Linux
platforms - I
know there is an equivalent .bat file for windoze systems, but I don't build
in that environment.)

PM: I do test builds under all the M$ platforms prior to release anyhow...

It is a piece of cake to invoke build.sh, passing down one or more
parameters, either on the make command line or as environment variables,
and from inside the script to pass the parameters to Ant with
"-Dproperty=value"
phrases on the line which starts the Ant JVM. These variables are accesible

So it's easy to get things like version numbers from the "make" world into
Ant.

PM: What about selecting what classes are actually built?

> 2: The org.postgresql.Driver class is created dynamically. Partly to
> include the version data, but also to include which implementation of
> java.sql.Connection is needed for that particular version of the
> driver. Ie, which one of the _three_ versions of the driver now in the
> source - JDBC1.1, JDBC2 and JDBC2-Enterprise which match to either
> JDK1.1.x, Java2SE and Java2EE respectively.

PM: This is still my main area of concern, how to easily handle the
different api's and the backend version numbering...

> 3: Currently make utilises a test class, utils.CheckVersion which is
> compiliable on all JDK1.1 or later VM's and checks for the existence of
> certain classes and parameters to check what true version of the JDK is in
> existence. Make then uses this to build the correct version of
> org.postgresql.Driver and the rest of the driver.
>

Ant has decent conditionals which should be sufficient

As a speed benchmark, Cocoon 1.8, with well over 100 Java source files,
builds in under 30 seconds on my PII/400 notebook w/ 128MB RAM
(and running lots of other stuff..)

PM: Both my linux box and laptop are K6II/400 with 128Mb, and it takes about
30-60 seconds dependent on load.

[snip]

> Also, how platform independent is ANT? I currently test the builds under
> Linux, and the various Windows entities (if you can call them an OS).

Ant was built under Solaris. Runs great on Linux (We use it exclusively for
Java - ditched make entirely for Java about 6 months ago). As for Windows,
I can only say that the documentation talks as much about Windows as it does
about *nix platforms, and many developers using it seem to be using
Windows...
No personal experience, though... (windows being one of the impediments to
my complete happiness...)

PM: I'm going to get ANT down today to check out the few issues we may or
may not have...

regards,
mdz

> > Peter Mount wrote:
> >
> > > I'll look into Ant, but I can see some possible problems, especially
as we
> > > have 3 versions of driver now (JDBC1.1, JDBC2 and JDBC2enterprise),
and I'm
> > > checking the JDBC2.1 specification at the moment.
> >
> > Mark Dzmura wrote:
> >
> > > (( I offer as a suggestion that Peter/et al move to using the Java
Apache
> > > project's
> > > "Ant" package for doing Java-only builds... It is so much faster and
cleaner
> > > to build under Ant (everything is compiled under a single JVM) and
> > > maintanence
> > > of the build.xml file is so much cleaner than hopeless makefiles...
> > >
> > > If there is interest, I will take a stab at creating a build.xml for
the
> > > JDBC driver...))
> >
>
> --
> Peter T Mount peter(at)retep(dot)org(dot)uk http://www.retep.org.uk
> PostgreSQL JDBC Driver http://www.retep.org.uk/postgres/
> Java PDF Generator http://www.retep.org.uk/pdf/

Browse pgsql-interfaces by date

  From Date Subject
Next Message Peter Mount 2000-10-20 07:45:05 RE: Ant Packaging - Was: building pgsql-interfaces.. .
Previous Message Christopher Cain 2000-10-19 21:51:15 Re: Ant Packaging - Was: building pgsql-interfaces...