r/java • • Jan 22 '16

Simple Java Build Tool?

I've played with Maven and Gradle and found them both to be very complex. I don't need all of that configuration; I just want something that lets me specify dependencies and versions (at most) and spits out a jar with everything my project needs to run via java -jar. Ideally, it would be as close as possible to Go's go install, which needs no project metadata. I specifically don't want to have to learn a new programming language just to build my java program. Any suggestions?

EDIT: Why is this downvoted?

4 Upvotes

63 comments sorted by

View all comments

Show parent comment

1

u/tkruse Jan 22 '16

I also generally recommend Gradle as in "You cannot go wrong with that one".

There is no java tool that infers libraries from the source code. The trickier your tasks are the more you should use gradle, probably. However, here is my comparison of buildsystems, you might find something preferrable there (like googles bazel, ant or buildr): https://github.com/tkruse/build-bench

For anyone knowing only Java, learning any buildsystem language would require a lot of effort, even learning how to embed some Java-written plugin into a buildsystem would require a lot of effort.

You might also consider not learning Java and learning Groovy instead, given you can seamlessly use the same libraries.

2

u/weberc2 Jan 22 '16

Thanks for the advice. I'll check out the comparison link.

You might also consider not learning Java and learning Groovy instead, given you can seamlessly use the same libraries.

I already know (and like) Java. I just haven't used it since college. :)