Debugging war package project directly tomcat-maven-plugin

Foreword

In the past, we debugging web project, you need to download a local tomcat in order to reuse items for others to fast commissioning, start here demonstrate a web project with maven plug-in method

Add the following plug-in pom file

<plugins>
    <plugin>
        <groupId>org.apache.tomcat.maven</groupId>
        <artifactId>tomcat7-maven-plugin</artifactId>
        <version>2.2</version>
        <configuration>
            <port>8080</port>
            <path>/</path>
            <uriEncoding>UTF-8</uriEncoding>
            <server>tomcat7</server>
        </configuration>
    </plugin>
</plugins>

Port project with the path and the like can be configured

Run the following command to start

mvn tomcat7:run

Or click on the button idea sidebar plug-in maven
Here Insert Picture Description

debugging

In this way the words can not start debugging source code, you can simply configure it.

Congigurations 1. Click Edit
Here Insert Picture Description
2. Select button maven
Here Insert Picture Description
project 3. Check to be executed, fill in the command to execute tomcat7: run
Here Insert Picture Description
at this time the project can be started by normal start-up and debug the right of two buttons
Here Insert Picture Description

Reference blog

[1]https://blog.csdn.net/MonkeyBrothers/article/details/79606127

Published 385 original articles · won praise 1471 · Views 900,000 +

Guess you like

Origin blog.csdn.net/zzti_erlie/article/details/105015108