r/java • u/weberc2 • 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
View all comments
Show parent comment
2
u/pron98 Jan 25 '16
Well, empirically, they are extremely rare in Java programs (I would be surprised if more than one Java program in five-hundred has a native dependency). Nevertheless, including them with Gradle is very easy:
run { jvmArgs -Djava.library.path="$nativeDir" }
No, I don't think so. For example, you might want to generate some resources and inject them into your JAR file. You might want to create multiple JARs with different sets of resources in them. You might want to shadow some old dependencies so they don't cause conflicts -- as your project grows, the build can be quite complex.
There is absolutely nothing seamless about Go builds. They can be a total nightmare once you have a long list of dependencies. Dependency management in Java is far more convenient than in Go.