How to change catalina.bat via maven pom.xml

I am using intellij idea, apache tomcat and maven 2.2.1, in pom.xml , we have the below part

<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>

      

when we run this it download apache tomact and then create app1-tomcat apps and apps folder, works fine but there is no bin folder in apps1-tomcat , we need to set JAVA_OPTS args in catalina.bat how can we do it in pom.xml so that it creates apps1-tomcat folder with bin folders and also that JAVA_OPTS args is set to Catalina. bat

Thanks in advance.

+3


source to share





All Articles