2

I am using maven2. I have tomcat7 installed. I want to configure the plugin to use tomcat7 that is installed. can somebody point to a link that does this.

jmj
  • 237,923
  • 42
  • 401
  • 438
user373201
  • 10,945
  • 34
  • 112
  • 168

1 Answers1

4

Use Cargo plugin for this. Configure cargo something like this

        <profiles>
            <profile>
                <id>integration</id>
                <build>
                    <plugins>
                      <plugin>
                        <groupId>org.codehaus.cargo</groupId>
                        <artifactId>cargo-maven2-plugin</artifactId>
                        <version>1.0</version>
                        <configuration>
                          <!-- Container configuration -->
                          <container>
                            <containerId>tomcat6x</containerId>
                          </container>
                          <configuration>
                            <type>existing</type>
                            <home>/usr/local/apache-tomcat-6.0.18</home>
                          </configuration>
                        </configuration>
                      </plugin>
                    </plugins>
                </build>
            </profile>
        </profiles>

I have same setup, but I have tested this on Tomcat6.0.x and Jetty 7.0.16. These links will help


for remote deployment use like this (must not be different in Tomcat7)

       <configuration>
        <!-- Container configuration -->
        <container>
            <containerId>tomcat6x</containerId>
            <type>remote</type>
        </container>
        <configuration>          
            <type>runtime</type>
            <properties>
              <cargo.remote.username>admin</cargo.remote.username>
              <cargo.remote.password></cargo.remote.password>
              <cargo.tomcat.manager.url>http://localhost:8888/manager</cargo.tomcat.manager.url>
            </properties>
        </configuration>
        ...
    </configuration>

Again refer the links above!

Nishant
  • 54,584
  • 13
  • 112
  • 127