DEV Community

Discussion on: Continuous Integration for Java

Collapse
 
jillesvangurp profile image
Jilles van Gurp

Ant is a bit old school at this point. I was using that last probably 13 years ago or so. These days, gradle and maven should have you covered unless you need to do very weird things. In which case, I would recommend to use a shell script rather than even attempt this as part of a build file using whatever plugins.

In any case, Ant seems a bit verbose these days and you end up with very non standard directory layouts and file locations for stuff. Not cool if you plan to work with other people.

Netbeans is also a bit of a blast from the past. I guess it still does the job if you stick to simple stuff.

Regarding CI, I would recommend actually using Github Actions if you are on Github with your project. Easy to use and well integrated and it's included for free (first 2000 build minutes each month). Travis-CI is similarish but I've had lots of performance issues with it. And keeping CI builds fast is important if you want to avoid having to wait for them a lot. Gitlabs also has pretty nice build infrastructure.

Collapse
 
mcartoixa profile image
Mac

Thank you for your feedback! I left the Java world a very long time ago and my needs here were quite specific: I don't expect anyone to manage an entire Java build using Ant nowadays.
My case is rather that when you want to add to the conventions laid out by Maven or Gradle, and given the choice between creating plugins or executing shell scripts, Ant is still a very compelling choice IMHO. Shell commands are too often indecipherable (some commands options in particular), and they are much harder to "run everywhere" (I am so old I remember this motto). Even going from Ubuntu to MacOS can be a problem...
And as for the CI platform, my whole point is to avoid tying your build with one in particular so that you can the freedom to choose the one you see fit. And change if you want to.