java - Add mojo to custom lifecycle defined by another maven plugin -
I am using a Maven plugin which defines custom packaging type and lifecycle for my projects "Foo -plugin "This packaging lets call" foo "I have no control over the plugin, but I want to expand it into the lifecycle definition in my plugin.
I am writing another plugin, it is called "bar-plugin". I should use a certain goal of my plugin in the process-source phase of a project with "foo" packaging, not in any other case. I have defined a mosaic to execute in the process of formulas but it executes in any process-source phase of any project, not just with "foo" packaging
/ ** * Gail Bar * @ Fez Process-Source * / Public Class Extends BarMojo AbstractMojo
I also extend the existing lifecycle Has attempted to use a custom lifecycle definition such as:
This is being completely ignored, even
Edit: The Maven project structure is as follows: Project name (packaging)
Mycompany-parent (pom)
- someprojecttype-parent (pom)
- - Project-1 (Foo)
- project-2 (foo)
I want to add a plugin for some project-paper, in which packaging is set to Palm while creating a parent project This time it executes the goal only when I execute Project-1 and Project-2, only to execute the goal Want.
In the last form, you need to put the plugin inside
& lt; Build & gt; & Lt; PluginManagement & gt; & Lt; Plugins & gt;
instead of just
& lt; Build & gt; & Lt; Plugins & gt;
should prohibit execution in child projects
Comments
Post a Comment