I’ve been playing around with different build tools for my Java projects recently, having never been very happy with Maven. Probably the best that I’ve found is Gradle: it has an easy to use build file format, and seems pretty flexible if you need to do something a little differently.
Unfortunately the documentation isn’t as comprehensive as it could be, and one of the areas where it’s not too great is in it’s interaction with the Maven repository system. So, here’s the magic incantation that you have to add to your build file in order to have gradle install install things correctly to your local repository:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
this will install the project binaries, to also install source and JavaDocs (which every project should really do) then you’ll also need to add:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
Update: here is a demo project with a complete build file and a ‘hello, world’ sample class, you should be able to just unzip this and then run gradle install to install it into your local repo (tested with Gradle 1.3).