Eclipse creates a Maven project

Source: Internet
Author: User

Reprint: https://jingyan.baidu.com/article/60ccbceb4af60a64cbb1977e.html

I. Changing the MAVEN library path

1. Change the path configuration of Maven library, extract the Settings.xml reference under the Conf file of the file, path location

2, modify the Maven library path, by changing the parameters of the Localrepository, refer to the description

Ii. Creating a Maven project

1, set Window>>preferences>>maven>>user settings change to their own modified path, reference

2. Create a MAVEN project under Eclipse, File>>new >>other Reference. Pop-up tick select simple Maven project

3, in the creation of the MAVEN project, Packing Choose the war format, so that under Src>main can be more than one webapp. Refer to the error that appears in the console corresponding to the markers of the form below to see the specific cause of the error

4, in the Pom.xml configuration

<build>      <plugins>          <plugin>              <groupid>org.apache.maven.plugins</groupid >              <artifactId>maven-war-plugin</artifactId>              <version>2.6</version>              < Configuration>                  <failOnMissingWebXml>false</failOnMissingWebXml>              </ configuration>          </plugin>        </plugins>  </build>  

5, the project right >>properties>>project facets configuration related properties, for the Jdk8 configuration diagram, reference. To see if a webcontent is generated, if there is no build, re-enter the interface, the Dynamic Web Module point is canceled, then go to configure this page hook, there will be. Finally, copy the WebContent Web-inf and meta-inf two folders to Src>>main>>webapp, and then delete the webcontent. This completes the initial creation of the MAVEN project. You can configure Pom.xml to introduce the required jar packages

6, Pom.xml introduced jar package can go to Baidu

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.