如何通过maven pom.xml修改catalina.bat

时间:2013-01-24 10:24:39

标签: maven intellij-idea tomcat6 pom.xml

我正在使用 intellij idea,apache tomcat和maven 2.2.1,在pom.xml 中,我们有以下给出的部分

<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<configuration>
    <wait>true</wait>
    <container>
       <containerId>tomcat6x</containerId>
        <zipUrlInstaller>
            <url>
            http://mirrors.enquira.co.uk/apache/tomcat/tomcat-6/v6.0.35/bin/apache-tomcat-6.0.35.zip
            </url>
            <installDir>${user.home}/tomcat6</installDir>
        </zipUrlInstaller>
        <systemProperties>
            <responseDirectory>${project.build.directory}/mockresponses</responseDirectory>
        </systemProperties>
    </container>
    <configuration>
        <home>${user.home}/apps1-tomcat</home>
        <properties>
            <cargo.jvmargs>
            <![CDATA[-Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n]]></cargo.jvmargs>
        </properties>
        <deployables>
            <deployable>
                <groupId>com.pra.apps1a</groupId>
                <artifactId>apps1a</artifactId>
                <type>war</type>
                <properties>
                    <context>/apps1a</context>
                </properties>
            </deployable>
            <deployable>
                <groupId>com.pra.mockserver</groupId>
                <artifactId>mockserver-web</artifactId>
                <type>war</type>
                <properties>
                    <context>/httpmockserver</context>
                </properties>
            </deployable>
        </deployables>
    </configuration>
</configuration>
<executions>
    <execution>
        <id>start-container</id>
        <phase>pre-integration-test</phase>
        <goals>
            <goal>start</goal>
        </goals>
    </execution>
</executions>
</plugin>
</plugins>

当我们运行它时,它下载apache tomact然后创建apps1-tomcat文件夹和应用程序运行正常,但在apps1-tomcat中有没有bin文件夹,我们需要设置 catalina.bat中的JAVA_OPTS args ,我们如何在 pom.xml 中直接执行此操作,以便它将创建带有bin文件夹的apps1-tomcat文件夹以及在catalina中设置的JAVA_OPTS args。蝙蝠

提前致谢。

0 个答案:

没有答案