2009-02-12 57 views
0

在包含的配置中,“stop-jetty”执行是否继承了外部“配置”元素的任何配置信息?在stop-jetty执行过程中,即使我将其从stop-jetty执行中省略,stopPort也会是9999?有关这种继承如何工作的任何文档参考也很棒。maven2中的替代插件执行?

<plugin> 
    <groupId>org.mortbay.jetty</groupId> 
    <artifactId>maven-jetty-plugin</artifactId> 
    <configuration> 
     <contextPath>/foobar</contextPath> 
     <stopKey>foo</stopKey> 
     <stopPort>9999</stopPort> 
    </configuration> 
    <executions> 
     <execution> 
      <id>start-jetty</id> 
      <phase>pre-integration-test</phase> 
      <goals> 
       <goal>run</goal> 
      </goals> 
      <configuration> 
       <scanIntervalSeconds>0</scanIntervalSeconds> 
       <daemon>true</daemon> 
      </configuration> 
     </execution> 
     <execution> 
      <id>stop-jetty</id> 
      <phase>post-integration-test</phase> 
      <goals> 
       <goal>stop</goal> 
      </goals> 
      <configuration> 
       <stopKey>foo</stopKey> <!-- Is this necessary ??? --> 
       <stopPort>9999</stopPort> <!-- Is this necessary ??? --> 
      </configuration> 
     </execution> 
    </executions> 
</plugin> 

回答

1

文档here将表明​​由每个execution共享,因此/plugin/executions/execution/configuration有效继承。

由于插件实现了JavaBeans标准,这意味着配置在执行过程中也会覆盖。