迁移 tomcat7-maven-plugin 到 cargo-maven3-plugin

问题描述 投票:0回答:0

我们正在更新一个项目以使用新的

cargo-maven3-plugin
而不是
tomcat7-maven-plugin
,我们需要一些帮助来了解如何配置某些功能。

现有插件配置为:

    <plugin>
        <groupId>org.apache.tomcat.maven</groupId>
        <artifactId>tomcat7-maven-plugin</artifactId>
        <version>2.0</version>
        <configuration>
            <port>7777</port>
            <contextFile>a/b/context.xml</contextFile>
            <tomcatUsers>a/b/tomcat-users.xml</tomcatUsers>
            <additionalClasspathDirs>
                <additionalClasspathDir>a/b/c</additionalClasspathDir>
            </additionalClasspathDirs>
            <path>/somename</path>
            <systemProperties>
                <CATALINA_OPTS>-Dcom.sun.management.jmxremote
                -Dcom.sun.management.jmxremote.port=9999
                -Dcom.sun.management.jmxremote.ssl=false
                -Dcom.sun.management.jmxremote.authenticate=false
                </CATALINA_OPTS>
            </systemProperties>
            <update>true</update>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>org.aa.bb</groupId>
                    <artifactId>ccc</artifactId>
                    <version>1.2.3</version>
                    <scope>runtime</scope>
            </dependencies>
    </plugin>

我们想用

cargo-maven3-plugin

    <plugin>
        <groupId>org.codehaus.cargo</groupId>
        <artifactId>cargo-maven3-plugin</artifactId>
        <version>1.9.9</version>
        <!-- Need to replicate the settings of the tomcat7-maven-plugin here
        JAR org.aa.bb:ccc:1.2.3 is declared as <scope>provided</scope> in the project's pom.xml. We want to configure the cargo plugin to copy this jar to our Tomcat instance when deploying the webapp.
         -->
    </plugin>

这些设置的等效

cargo-maven3-plugin
语法是什么?

我们已经在本地安装了 Tomcat v9,但我们也愿意使用嵌入式实例,如果这样可以简化事情的话。

maven tomcat cargo-maven2-plugin tomcat7-maven-plugin
© www.soinside.com 2019 - 2024. All rights reserved.