Intellij IDEA14 + Maven + Tomcat Build Project

Source: Internet
Author: User

1.New project--> Select the left maven--> click Next

2. Enter GroupID and Artifactid, click Next

3. Enter project name, select Project Location, enter module name, select Content Root, module file location, click Finish

4. Select the module that you just built, right-click "Add framwork Support ..." and select Struts 2 in the popup dialog box.

5. Add the following configuration to the Pom.xml file after the creation is complete

    <Packaging>War</Packaging>    <Build>        <Plugins>            <plugin>                <groupId>Org.apache.maven.plugins</groupId>                <Artifactid>Maven-war-plugin</Artifactid>                <version>2.1.1</version>                <Configuration>                    <webappdirectory>Web</webappdirectory>                </Configuration>            </plugin>        </Plugins>    </Build>        <Dependencies>        <Dependency>            <groupId>Org.apache.struts</groupId>            <Artifactid>Struts2-core</Artifactid>            <version>2.3.15.3</version>        </Dependency>    </Dependencies>

6. Move the generated struts.xml file to the Resources folder.

7. Configure Tomcat, for example, click the + sign under before Launch:make, pop up the dialog configuration, click OK

8.Maven package generates the target directory and then goes back to the deploy at the server startup under the deployment of Tomcat configuration, select "External Source ...", Select the war package generated under the target directory that you just generated, click OK

9. To this all configuration is complete.

Intellij IDEA14 + Maven + Tomcat Build project

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.