mystarrocks
mystarrocks

Reputation: 4088

List all the modules of an aggregate POM dependent on a specific dependency

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?

Upvotes: 2

Views: 1572

Answers (1)

mystarrocks
mystarrocks

Reputation: 4088

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

Upvotes: 0

Related Questions