Question

I've been using Maven and ant+ivy so far but I think it is rather hard to maintain all the configuration for them.

What I'd really like to have is something like leiningen which does not need any xml and you can manage the dependencies in code (in clojure code in case of leiningen). It also comes with a handy cli tool.

I know that leiningen uses maven internally so it is not a problem if your suggestion uses maven internally as well so a good abstraction which simplifies things and requires no interaction with maven/ant/ivy will be equally good for me.

Was it helpful?

Solution

I would use pure maven or gradle, as it is easier to create build scripts, but would steer away from ant.

Ivy is an underused dependency management solution, and I personally have only cursory experience (as in building artifacts but not managing them) and I have never maintained an ivy build, but seems pretty straightforward. One thing to consider is availability of plugins and readily built artifacts(which is proportional to popularity) and maven is the clear leader.

So, my recommendation would be pure maven or gradle.

Edit: In recent years it has become modern for some repo owners to maintain both an ivy and a maven build to increase their code's exposure. If you were to do that, gradle would be simpler as it provides a nice abstraction on top of the nitty gritty maven/ivy stuff, once you are to write your scripts.

OTHER TIPS

I would suggest gradle. Gradle is both a dependency management and build system. You write your build scripts in groovy code, no xml. gradle can work with existing ivy or maven repos. Its configuration tends to be a lot less verbose than maven's and it's very flexible (since you can write code in your build script when needed).

There is plenty of documentation at http://www.gradle.org/documentation

There used to be a project called Polyglot Maven which was maven configured in code not xml. Some detail is given about its current status here: What happened to Maven Polyglot?

I also found Buildr (for building Java projects, with config written in Ruby).

I think it'd be worth clarifying why it is you find the configuration for maven difficult to maintain. Certainly the XML can be pretty nasty but there's lots of tooling available in IDEs etc. If its the actual project structure and or build lifecycle that's difficult (and it can be, especially with multimodule builds) then a solution that's based on maven probably won't be much better.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top