Debug Maven plugin for Eclipse

I would like to debug the Maven plugin under Eclipse. I suppose I can say that it is a dependency; then write some java class that imports the plugin (somehow) and runs it as execution of the maven plugin 'exec', the target is 'java'? Will it be doable or "too complicated"?

(Btw, use case: this is a hibernate3 plugin that I cannot get to create sql. It can make it generate xml, for example, "Level.hbm.xml", although I am not aware. The question itself.)

(EDIT: correct title, tag added.)

-EDIT2 -

Now I see that I may not have explained exactly what I wanted: I want to debug the plugin when it runs in the project where it is used. I would like it to find its options / configuration from pom.xml when I start debugging, if possible.

+4
source share
1 answer

If you use the m2e Eclipse plugin, you can do the following:

  • Download and open other Maven projects, for example. Hibernate plugin (File> Import> Maven> Materializing Maven Projects from SCM)
  • Run and debug them locally

For an example see https://docs.sonatype.org/display/M2ECLIPSE/Developing+and+debugging+Maven+plugins .

+1
source

Source: https://habr.com/ru/post/1402908/


All Articles