Eclipse New Maven Project (2)

Source: Internet
Author: User

This blog post is a continuation of the previous post Eclipse new Maven project (1), the post is not in the essay.
First, follow the previous blog post to create a MAVEN project operation, after a series of operations found after refreshing the project will be error:

Don't worry, you can fix it.

After selecting the item, right-click:

Then upgrade the MAVEN project to see the error resolved, without the red fork hint.
For each MAVEN project upgrade, the JDK version of the project will become the 1.5 version of the problem, in fact, can be set up, only need to add the following code in the Pom.xml file to implement the MAVEN project after each update does not need to manually adjust the JDK version.

1   <!--source 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                     <!--Specifies the version of source and target-->11                     <!--source Specifies which version of the compiler is used to compile the Java source code-->12                     <source>1.7</source>13                     <!--target Specifies which version of the class file will be guaranteed to be compatible with the virtual machine-->14                     < target>1.7</target>15                 </configuration>16             </plugin>17         </plugins>18   </build>

The locations added are:

This way, you don't have to worry about manually adjusting the JDK version of the project after you update the MAVEN project.

Reprint please indicate the source, thank you.

Eclipse New Maven Project (2)

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.