MAVEN One-click deployment of Linux Tomcat (Wagon-maven-plugin)

Source: Internet
Author: User

MAVEN is a project management tool that contains a project object model, a set of standard collections, a Project life cycle (Project Lifecycle), a dependency management system (Dependency Management System), and the logic used to run the plug-in (plugin) target (goal) defined in the life cycle phase (phase). When you use MAVEN, you use a well-defined project object model to describe your project, and maven can apply crosscutting logic that comes from a set of shared (or custom) plug-ins.

After the development of the program is deployed to the online Linux server, it may be necessary to go through a series of tedious steps such as packaging, uploading the package file to the server, SSH connecting to the server, and knocking the command launcher. In fact, these steps can be accomplished via a MAVEN plugin wagon-maven-plugin.

Here, my project is to use the Wagon-maven-plugin plugin to complete the deployment to Tomcat on a Linux remote server.

The simple steps are as follows

1> configures the user name and password for the remote connection server in the Maven setting.xml file. My configuration is as follows (for reference only)

      <servers>

        <server>

          <id>linuxhhy</id>

          <username>hhy</username>

< Span class= "Hljs-title" > <password>hhy123</PASSWORD>

< Span class= "Hljs-title" >     </SERVER>

< Span class= "Hljs-title" >       </SERVERS>

< Span class= "Hljs-title" > < Span class= "Hljs-tag" >             2> Through Wagon-maven-plugin, the project's war package is uploaded to the appropriate directory. After packaging is complete, the package is located in the target directory, in order to deploy on the remote server, first to upload the war package to the server.

< Span class= "Hljs-title" > < Span class= "Hljs-tag" > configure Pom.xml plug-ins in Wagon-maven-plugin of the project: /span>

        

=============================================================================================

3> configuration can be deployed remotely to the specified server via Maven

Or

MAVEN One-click deployment of Linux Tomcat (Wagon-maven-plugin)

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.