Maven runs to the Web server through the cargo configuration

Source: Internet
Author: User
Tags glassfish

1. Configure standalone to copy the local Tomcat server configuration and run it in the directory specified by standalone, which can be run as a specified port

[html] view plaincopy<plugin>      <groupid> Org.codehaus.cargo</groupid>      <artifactid>cargo-maven2-plugin </artifactId>      <version>1.2.4</version>       <configuration>          < container>              < containerid>tomcat7x</containerid>                

Execute MVN Package Cargo:start


2. Download and run the Web server

[HTML] View plaincopy<container> <containerId>glassfish3x</containerId> <containerurl>ht Tp://download.java.net/glassfish/3.1.1/release/glassfish-3.1.1.zip</containerurl> </container>


Execute MVN Package Cargo:start


3. Run by existing mode

[html] view plaincopy<plugin>      <groupid> Org.codehaus.cargo</groupid>      <artifactid>cargo-maven2-plugin </artifactId>      <version>1.2.4</version>       <configuration>          < container>              < containerid>tomcat7x</containerid>                

The port number cannot be specified and it runs directly to the server at the specified location

Execute MVN Package Cargo:start

4. Configuring to a remote Web server

[html] view plaincopy<plugin>      <groupid> Org.codehaus.cargo</groupid>      <artifactid>cargo-maven2-plugin </artifactId>      <version>1.2.4</version>       <configuration>          < container>              < containerid>tomcat7x</containerid>               <type>remote</type>           </container>          <configuration>               <type>runtime</type>               <properties>                   <cargo.hostname>localhost</cargo.hostname>                    <cargo.servlet.port>8080</cargo.servlet.port>                   <cargo.remote.username>tomcat</ cargo.remote.username>                   <cargo.remote.password>tomcat</cargo.remote.password>               </properties>           </configuration>      </ Configuration>  </plugin>

Run the MVN package Cargo:redeploy to configure the war to the port port of localhost

Run MVN cargo:undeploy unload war


Maven runs to the Web server through the cargo configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.