Import Maven project error solution in Eclipse

After installing Maven on the new machine, import the Maven project into Eclipse,

The project in Eclipse reports Unbound classpath variable: 'M2_REPO/**/***/***.jar'

But my local path actually contains these jar packages:

C:\Documents and Settings\xxxxx\.m2\repository\**\***.jar

 

Solution:

Add the M2_REPO parameter in Eclipse:

Eclipse->Windows->Preferences->java->Build Path->Classpath Variables,

Create a new name M2_REPO, point the path to folder, point to C:\Documents and Settings\xxxxx\.m2\repository, as shown below:

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326950559&siteId=291194637