2009-02-12 58 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標準,這意味着配置在執行過程中也會覆蓋。