Create a maven project in eclipse (2), eclipsemaven

Source: Internet
Author: User

Create a maven project in eclipse (2), eclipsemaven

This blog post continues with the previous blog post eclipse's new maven Project (1), which is not included in the article.
First, follow the previous blog post to create a maven project. After a series of operations, an error will be reported after the project is refreshed:

Don't worry, you can solve it.

Right-click the project and select:

After upgrading the maven project, you can see that the error is fixed and there is no Red Cross prompt.
After each maven project is upgraded, the jdk version of the project will change to version 1.5. In fact, you can set it only in pom. add the following code to the xml file to update the maven project without the need to manually adjust the jdk version.

1 <! -- Source code directory, plug-in management, and other configurations --> 2 <build> 3 <finalName> MavenSpringMVC </finalName> 4 <plugins> 5 <plugin> 6 <groupId> org. apache. maven. plugins </groupId> 7 <artifactId> maven-compiler-plugin </artifactId> 8 <version> 3.3 </version> 9 <configuration> 10 <! -- Specify the source and target versions --> 11 <! -- Source specifies the version of the compiler used to compile the java source code --> 12 <source> 1.7 </source> 13 <! -- The class file generated by target is compatible with the virtual machine of the specified version. --> 14 <target> 1.7 </target> 15 </configuration> 16 </plugin> 17 </ plugins> 18 </build>

The added location is:

In this way, you don't have to worry about manually adjusting the jdk version of the maven project every time you update the maven project.

Please indicate the source for reprinting. Thank you.

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.