Re: Pre-processing during build

From: Sehrope Sarkuni <sehrope(at)jackdb(dot)com>
To: Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: Markus KARG <markus(at)headcrashing(dot)eu>, List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Pre-processing during build
Date: 2015-06-15 22:42:13
Message-ID: CAH7T-ap2yMyiCEEajffqd863Dpnjag_LVvWPnP5PuARpbbJ1UA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Mon, Jun 15, 2015 at 6:17 PM, Dave Cramer <pg(at)fastcrypt(dot)com> wrote:

> How can you use the same name and different bytecode versions ?
>

Short answer is you can't.

Longer answer is, as long as the classes don't use types that aren't
defined in the newer interface, you can include implementations for methods
that aren't defined in an older interface definition. It's only a problem
if those methods use types that don't exist (ex: if a function signature
used the new Java 8 time types). You'd also need to either compile with the
older target bytecode version or actually build multiple versions off the
same source.

I think a purely Maven based build with separate targets should be possible
via a generated-sources plugin. Off the top of my head I'm not sure which
plugins it would use though. It's been a while since I wrote anything like
that though I do remember it being a bit of a pain to get right. On the
plus side we only have to figure it out once right? :)

I'm a big fan of Mavenizing the build process. A lot of the value of it
will come from how it will simplify things like adding tests. It eliminates
a lot of the double and sometimes triple entry (i.e. add the test class,
add it to a suite, add the suite to build.xml).

Regards,
-- Sehrope Sarkuni
Founder & CEO | JackDB, Inc. | https://www.jackdb.com/

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Vladimir Sitnikov 2015-06-15 22:47:46 Re: Pre-processing during build
Previous Message Dave Cramer 2015-06-15 22:17:14 Re: Pre-processing during build