Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Super POM, Parent POM type of hierarchy management in Gradle

Tags:

gradle

We are currently using Maven as our build tool and there is a directive to migrate to Gradle. Our current setup is:

  1. We have a super POM that defines all third party dependencies, various plugins, distributionManagement URLs and this POM is uploaded to our releases repo.
  2. We have an aggregator POM that uses this super POM as parent and aggregates several submodules.
  3. We have several profiles defined in aggregator POM to build components.

My question is, what is the best way to do all these in Gradle. How can I define all third party dependencies in a single Gradle config and use it in other places.

I am new to Gradle and so, this might sound a very stupid question. But I request all to provide some help and guidance.

like image 801
Niranjan Avatar asked Nov 22 '13 03:11

Niranjan


1 Answers

Instead of the super POM, you'd write a Gradle plugin and distribute that. Not exactly sure what you get out of 2. and 3., but if these definitions are reused between builds, they would again go into a plugin, and otherwise into a parent build script.

like image 53
Peter Niederwieser Avatar answered Dec 09 '22 06:12

Peter Niederwieser