0

How do plugins add to build phases.

I realize that maven has a list of goals that it executes by default but when we add a plugin node to the pom.xml,

For example, as per the maven documentation if we include the following plugin

<plugin>
   <groupId>org.codehaus.modello</groupId>
   <artifactId>modello-maven-plugin</artifactId>
   <version>1.4</version>
   <executions>
     <execution>
       <configuration>
         <models>
           <model>src/main/mdo/maven.mdo</model>
         </models>
         <version>4.0.0</version>
       </configuration>
       <goals>
         <goal>java</goal>
       </goals>
     </execution>
   </executions>
 </plugin>

Q1. What build phase does it tie into by default ?

Q2. Does it get executed in addition to the 'default' goal?, for example if i have a plugin that just echos 'hello' and it gets tied to the compile phase, do i get a echo of 'hello' in addition to the compilation?

Thanks Venu

4

1 回答 1

0

您可以在插件的文档中看到java 目标绑定到generate-sources.

你所说的default目标不存在。在 maven-plugin:goal 和与项目的打包类型相关的生命周期阶段之间的默认绑定的含义上,它更有意义。那里有一种在Maven 超级 pom中定义的默认绑定,它定义了目标及其在生命周期中的执行。

于 2013-07-30T14:39:34.360 回答