maven2中的备用插件执行?

时间:2009-02-12 12:29:00

标签: java maven-2

在包含的配置中,“stop-jetty”执行是否从外部“configuration”元素继承任何配置信息?即使我从停止码头执行中省略了它,stopPort执行中的stopPort也会是9999吗?关于这种继承如何工作的任何文档引用也都很棒。

<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 个答案:

答案 0 :(得分:1)

文档here会建议每个/plugin/configuration共享execution,因此/plugin/executions/execution/configuration会有效继承。

由于插件实现了JavaBeans标准,这表明执行中的配置也会覆盖。