2

Here's my aggregate POM:

<project>
  ...
  <groupId>myAggregate</groupId>
  <artifactId>myAggregate</artifactId>
  ...

  <modules>
    <module>module1</module>
    <module>module2</module>
    <module>module3</module>
    <module>module4</module>
    <module>module5</module>
  </modules>

  ...
</project>

Assume that the modules: module1, module3 and module5 depend on same/different versions of an artifact, say, dependency1. I wanted the maven-dependency-plugin to list these modules when I run a goal on the aggregate POM above, but I couldn't find a goal that would do it for me. Like, for example:

mvn dependency:dependents-of -Dartifact=...

Anyone know of any plugin that tells me this or if I should write my own goal for the plugin?

mystarrocks
  • 4,040
  • 2
  • 36
  • 61
  • There is a duplicate question https://stackoverflow.com/questions/24809783/find-dependant-reverse-dependencies-in-maven-project – Martin Špelina Oct 25 '19 at 13:18

1 Answers1

1

Since the modules were right under the aggregator, I merely used grep on the pom.xmls to list them. Sometimes, simplicity helps ;)

mystarrocks
  • 4,040
  • 2
  • 36
  • 61