STS (Eclipse) + Maven deploys the war project to the remote tomcat

Summary: STS (Eclipse) + Maven deploys war project to remote tomcat For many reasons, we need a test environment. And because of some factors, we have to deploy our project to the server remotely. So it involves how to deploy the project to the remote tomcat.

STS (Eclipse) + Maven deploys the war project to the remote tomcat

for many reasons, so we need a test environment. And because of some factors, we have to deploy our project to the server remotely. So it involves how to deploy the project to the remote tomcat. First we need to configure the Run Configurations of STS. Explain that STS is a tool that integrates Spring. Not much different from Eclipse. Closer to home, find Maven Build in the toolbar Run->Run Configurations
00000001

on the left, right-click New a Run Configuration;
then configure the Base directory and Goals;
Base directory select the project path that needs to be deployed remotely;
Goals fill in tomcat:redeploy;
0000000

and then Apply That's it.
Next, we need to configure the pom.xml file.
Add the following code to plugins:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>tomcat-maven-plugin</artifactId>
    <
        <url>http://*****:8080/manager/text</url>
        <server>test</server>
        <username>username</username>
        <password>password</password>
        <server>test </server>
        <update>true</update>
    </configuration>           
</plugin>
The parameters above can be configured by yourself. . There is basically no difficulty in understanding the parameters.
Once configured, you can run it. Toolbar Run->Run Configurations, also find the newly created configuration name on the left, and then click Run to OK.
000000003
Then you can see the deployed information:
00000004
You're done! !


Use Yunqi Community APP, feel comfortable~

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326056705&siteId=291194637