Hey I was wondering if anyone knows about somethin...
# community-support
s
Hey I was wondering if anyone knows about something similar to https://maven.apache.org/plugins/maven-help-plugin/effective-pom-mojo.html for Gradle or if there are instructions on how to generate an effective pom for a given Gradle project?
v
What would you imagine this doing in Gradle?
s
Thanks for your reply @Vampire. What I’m looking for is a singular Pom file that has all the dependencies and plugins for a project. If it’s a multi-module project I want the Pom file that is generated to combine all dependencies and plugins for all sub-projects. What I also want is to not do full dependency resolution, i.e. not download jars but only poms for all dependencies and their transitives
So essentially a combination of all build.gradle files represented as a pom but what I am only interested in is the dependencies and plugins. It should resolve dependencies brought in by plugins, shared build.gradles, etc..
v
Even the Maven plugin you linked to does not what you describe as far as I understood its documentation. 😄 Anyway, at least I'm not aware of any such functionality or plugin. Would would be your use-case? What do you need that for?
👍 1
s
Yes you are correct in saying the maven plugin does not do this natively but produces an output that can be parsed to get what I want. For example in the case of multi module projects it creates a singular Pom with a projects key with multiple project sub keys containing each resolved Pom. For a normal build it just generates the effective Pom in the location you provide. The use case here is largely to analyse gradle projects programmatically. What plugins are they using what dependencies etc. One of the main things I am really looking for is not to do full dependency resolution tho. Only resolving poms is what I would like to do
v
You should probably use the tooling api to get that information just like IDEs are doing. I'm pretty sure if done right you can do it in a way that does not need to download the actual artifacts.
s
Thanks for the pointers I’ll look into this now @Vampire much appreciated
👌 1