Warning - m2 programming noobie here.

I'm trying to write a mojo that will execute when maven runs anytime the
plugin is referenced, without adding the executions.

In other words, I want the pom to be:

     <plugin>
       <groupId>org.example.maven</groupId>
       <artifactId>maven-businessrules-plugin</artifactId>
     </plugin>
   </plugins>

instead of

     <plugin>
       <groupId>org.example.maven</groupId>
       <artifactId>maven-businessrules-plugin</artifactId>
       <executions>
         <execution>
           <goals>
             <goal>rule1</goal>
             <goal>rule2</goal>
             <goal>rule3</goal>
             <goal>rule4</goal>
             <goal>rule5</goal>
             <goal>rule6</goal>
           </goals>
         </execution>
       </executions>
     </plugin>
   </plugins>


and let the plugin itself figure out which rules to execute during which
phases.

I've tried a number of different combinations of @goal, @phase and @execute,
also different combinations of @execute parameters, but haven't had any luck
yet.

Can this even be done?

Thanks in advance.

Reply via email to