Eclipse creates a Maven project

Source: Internet
Author: User

1. Create a new MAVEN project and right-click on the project selection-->properties--> Select Javabuildpath-->source-->addfolder, add src/main/resources and src/ Test/resources

2. Double-click the output folder under Src/test/java and Src/test/resources, and set the class publishing directory for the test code compilation to Target/test-classes. In order to not be mixed with the official code compiled files, the official code publishing directory using the default target/classes.

3. Adjust the display order of the folder in order and export

4. Double-click in libraries to replace the default JRE with your own JRE

5. Convert to a Dynamic Web project so that Tomcat recognizes

Click on the left side of Project Facets, on the right, select dynamic Web Module-----set version to 2.5 (default 3.0 for Java7), and temporarily do not click OK

6. Click on the further configuration available ..... set Web. XML in the directory of Src/main/webapp, Apply

7. Click Deployment Assembly on the left to delete the two test folder that you do not need to deploy

8. Set up a package that releases Maven dependencies at the same time
Click Add, double-click Java Build Path Entries, double-click Maven Dependencies-OK

9. Project

10. Configure Maven auto-download jar

1. Specify the URL of the download jar in the C:\User\ user name \.m2\settings.xml file

2. Specify the coordinates of the jar in the Pom.xml file in the project

At this point, a completed MAVEN project is completed.

Eclipse creates a Maven project

Related Article

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.