Eclipse import settings for MAVEN projects and red exclamation marks after import

Source: Internet
Author: User

(1) in Windows->preferences->build path->classpath variable, the MVN library is imported, the name must be called "M2_repo", the selected directory is generally similar to "/home/ Potter/.m2/repository "


(2) Many students perform MVN eclipse:eclipse, and after importing eclipse there are many red forks (or a red exclamation mark on the item). This is usually caused by a lack of m2_repo variables. Can be resolved by configuring the M2_repo variable.

Here's how:

In Eclipse, select Window-> perferences, then select Java-> Build Path-and Classpath Variable to see if there are any M2_repo variables in the variable list on the right.

The new variable is simple:
Click the New button, the variable name is M2_repo, the value is the path of the MAVEN local library on your machine, which is generally/home/yourname/.m2/repository. After adding eclipse will build again workspace.


View suggested "Package Explorer"


or install: M2eclipse plugin is also OK

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.