Home > database >  Unable to find out where reflections-maven plugin comes from
Unable to find out where reflections-maven plugin comes from

Time:01-02

There executes a particular Maven plugin and I struggle to find out where it comes from to either remove or replace it as its compile dependency link is broken. I am talking about enter image description here


Update 2 and solution:

Upon installing Netbeans (I use IntelliJ Idea by default), the Effective tab of the POM editor finally led me to the true origin where the plugin is defined.

enter image description here

Sadly, IntelliJ Idea doesn't provide such navigation through its effective POM and navigating to the origin is virtually impossible without manual clicking through parent POMs.

CodePudding user response:

With Help:Effective-Pom:

mvn -Dverbose=true -Doutput=./effective-pom.xml help:effective-pom

We can analyze our "effective pom" (Pom#inheritance, Pom#super-Pom).

  • The verbose flag will also add the source pom (artifact) as a comment to each output line.
  • output sets an output file. (default: prints to console)

"inter alia" it allows us to locate/override any inherited plugin/dependency/"pom element".

Unfortunately the output generates:

  • for "trivial" projects "hundreds" lines of pom.
  • for "non-trivial" (spring-boot-starter), it gets easily into "ten-thousands" (lines of pom).

In we have a "Show effective Pom" command, which basically invokes the mentioned goal and shows the output (in community edition unfortunately!?) without "verbose".


has a "Effective" tab in its "Pom Editor"(, "Graph" view also very nice..., and can be installed un-rooted;)!


Update:

So the mojo seems to work as documented:

<verbose> boolean (since:)3.2.0 Output POM input location as comments.

Default value is: false.

User property is: verbose.

For verbose to have an effect, we need to:

<project ...>
 ...
 <build>
   <plugins>
     <artifactId>maven-help-plugin</artifactId>
     <version>3.2.0</version> <!-- or higher! -->
   </plugins>
 </build>
 ...
</project>

... respectively can (without pom modification):

mvn -Dverbose=true -Doutput=./eff.pom.xml \
  org.apache.maven.plugins:maven-help-plugin:3.2.0:effective-pom
  • Related