Maven to Gradle migration for enterprise projects


(Vít Jouda) #1

I am currently evaluating the best way to migrate our Maven based infrastructure to Gradle build system. I came to like Gradle on smaller, standalone projects much more then Maven. But I am not sure Gradle is ready to replace Maven for larger, enterprise projects. I have some specific points in mind (in relation to Maven) which I would like to achieve with Gradle.

  • Parent POM like functionality. I believe custom Gradle Plugins are good solution for basics like company-wide dependency management. But is is highly custom and non standard solution.

  • Local artifact installations. It is common use case to have multiple standalone projects which are related to each other. For example some common utilities library. With Maven, you can just install your modified dependency locally so it is used when building your dependant project. I always took this funtionality for granted (IDEs support this as well). But with Gradle i have not found any similiar functionallity. I don´t want to have local Maven installation (what´s the point of Gradle then) just to be able to install artifacts locally. Also I don´t want to depend on CI, since during development programmers like to iterate until they are happy with API. There would be many useless commits just to compile and install it in our Nexus. These are the 2 main options I found ppl are using as substitute. I believe you can setup filesystem dependency, but then every programmer needs to configure it for himself which is inconvinient.

  • The same point as above for multi-module projects. With Maven you can checkout and work only on single module within project. But with Gradle you have to checkout whole project. I believe this is partially solvable using Composite builds but you still have to checkout at least root project settings.

I wonder what are the best practices to solve these problems.