You are not logged in.

#1 2016-02-05 10:39:04

hrobeers
Member
From: Belgium
Registered: 2008-11-05
Posts: 79

Looking for KISS Java build system

I'm looking for a KISS java build system.

The internet is full of bad and contradictory answers, so I hope to find an answer in the great community of my favorite OS.

Context
I'm asking this because I want to create a simple command line tool around some messy but functional Java code.
I mainly program C++ using CMake, and I love that, but I'm not at home in the Java world.
I'll be using Emacs BTW.

Thanks for any help!

Edit:
I'll probably go for Ant, because it seems simple to me. But I'd appreciate some input from more experienced Java devs.

Last edited by hrobeers (2016-02-05 10:52:50)

Offline

#2 2016-02-05 17:13:37

Nis
Member
Registered: 2010-01-20
Posts: 5

Re: Looking for KISS Java build system

Go with maven or gradle. Both are well-known, well supported, feature complete, and still actively developed. Ant is okay if you're in a network constrained development environment, but Java development has trended towards automatic dependency resolution via the internet. Many frameworks and libraries package things with the assumption your build tool will download dependencies, both explicit and transitive.

Offline

#3 2016-02-07 01:27:09

Trent
Member
From: Baltimore, MD (US)
Registered: 2009-04-16
Posts: 990

Re: Looking for KISS Java build system

Java and KISS don't really go together, in my opinion. Nothing about Java is simple. But you said you like cmake, so maybe you're using a different definition of KISS from mine. What would you consider "simple"?

Offline

#4 2016-02-08 12:08:59

hrobeers
Member
From: Belgium
Registered: 2008-11-05
Posts: 79

Re: Looking for KISS Java build system

You might be right about CMake not being KISS.
However, it's mostly not KISS because of the project structure not being KISS.
Look at the CMakeLists.txt file here: http://www.vtk.org/Wiki/VTK/Examples/Cx … DataFilter
Seems quite KISS to me.

I was afraid that there is no KISS in the Java world.

Offline

#5 2016-02-08 14:08:14

Nis
Member
Registered: 2010-01-20
Posts: 5

Re: Looking for KISS Java build system

I would say KISS and build systems don't really go together. Unless your build system is uniquely built and tailored for your project it's going to have to be generalized which means it's likely not simple.

You can have a build system in Java that doesn't require large configuration files if you stick with conventions. For example, a minimal maven pom.xml comes in at around 40 lines. It's not completely devoid of verboseness, but it's still not a tangled web like some Ant builds I've had to work with.

Offline

#6 2016-02-08 14:16:38

hrobeers
Member
From: Belgium
Registered: 2008-11-05
Posts: 79

Re: Looking for KISS Java build system

Thanks Nis,

this is really helpful!

Offline

#7 2016-02-18 22:17:02

katsuki
Member
From: NY, USA
Registered: 2015-01-28
Posts: 26

Re: Looking for KISS Java build system

As a principal software engineer for my current company (we are a start up) I ended up being the individual who chose how our software gets built. My choice for Java was Maven, and for Linux C/C++ I chose CMAKE. Maven can be very simple for basic functionality and has a ton of plugins and power for more esoteric/complex builds. Maven also makes it super easy to create a shaded uber-jar which is great for deploying applications without having to worry about dependencies and without having to worry about dependent library version conflicts if your deployed artifact can be used as a library. Also pretty much every Java library ever is available through maven; for using something like Ant with Ivy for dependencies, you end up having to use an adapter to get Ivy to understand Maven to pull most libraries (unless you manually maintain your own Ivy repository). I don't have much experience with Gradle, but at the time I was deciding Maven had more support, documentation, and functionality that I needed out of the box. I hear Gradle is pretty cool, but Maven has proven its worth for far longer.

Offline

Board footer

Powered by FluxBB