Re: Pre-processing during build - Mailing list pgsql-jdbc

From Mark Rotteveel
Subject Re: Pre-processing during build
Date
Msg-id 2e342260dbeeba275a4e7d81cc9ff572@imap.procolix.com
Whole thread Raw
In response to Re: Pre-processing during build  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
List pgsql-jdbc
On Tue, 16 Jun 2015 17:19:27 +0300, Vladimir Sitnikov
<sitnikov.vladimir@gmail.com> wrote:
> Mark> My experience is that Ant gives you a lot more flexibility
>
> What that flexibility is good for?

I am not here to start a "my favorite build system"-war, I am just saying
that for a project like a JDBC driver, which needs to target different
versions of Java, the flexibility of Ant may be necessary, or getting it
working and working correctly on Maven may be more complex, especially as
Ant is already in place and working.

> The drawbacks of Ant are:
> 1) No "easy way to configure IDE". This includes "download javadoc and
> source", adding dependencies to the classpath, etc, etc.

Good point.

> 2) No easy way to run tests. With maven you just hit `mvn install` or
> `mvn test` and it just works. With Ant you have to read instructions.

That is a matter of using targetnames that follow a convention, correct
dependencies and a sane default target (in which case just running ant
could be sufficient to build and test).

> 3) No easy way to test different versions. With maven, I can depend on
> "snapshot" versions in my client application, and I easily can
> debug&step-into.
> Unfortunately, due to #1, debugging dependencies is not that easy.

Good point, you can achieve that with Ant+Ivy, though that will complicate
IDE integration further.

> 4) No easy integration with other systems. For instance, if using
> maven you can just add findbugs, sonar, etc, etc.
> If you want to try recent Facebook's infer, you just hit `infer mvn
> install`

SonarQube, findbugs and Infer support ant. It might require more explicit
config than in Maven, but that should be setup once and forget, for infer:
infer -- ant <your build target>

> Well, gradle might be even better approach, however I have not used it
> yet, so I have nothing to say here.

I use Gradle as well, but I don't know it too well yet. It is a bit of a
maven/ant hybrid, and I am not yet sure if I'd prefer it over Ant (or
Maven).

Mark


pgsql-jdbc by date:

Previous
From: Vladimir Sitnikov
Date:
Subject: Re: Pre-processing during build
Next
From: Mark Rotteveel
Date:
Subject: Re: Pre-processing during build