3

私はintellij のアイデア、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 引数を設定する必要があります。pom.xmlに直接追加して、bin フォルダーを含む apps1-tomcat フォルダーと、catalina.bat に設定された JAVA_OPTS 引数を作成するようにします。

前もって感謝します。

4

0 に答える 0