본문 바로가기
웹개발정보

[Spring] org.apache.maven.plugins:maven-resources-plugin:jar:2.6 오류

by hankong 2021. 9. 28.
반응형

Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6 Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6

 

 

 

일년이 지난 workspace를 열어봤더니 위와 같은 오류가 발생했다.

구글링을 통해 repository 폴더를 삭제 해보기도 하고 

자바 버전을 변경해보기도 하고

maven사이트에서 직접 jar 파일을 다운로드 해보기도 했으나 안됐다....

 

아주 어리석었다ㅠㅠ.....

 

 

 

이 오류를 발견하면 가장 먼저 내 프로젝트 maven 경로를 살펴보는게 첫번째!!

 

Window -> Preferences -> Maven -> User Settings에 들어가보면 아래와 같이 

maven setting 파일의 경로가 나온다.

 

 

나는 User Settings 는 현재 프로젝트의 Setting 파일로 잘 지정이 되어있었고

Local Repository 경로가 다른 프로젝트에 물려있었다.

(나는 workspace 마다 maven 폴더를 각각 지정해주는데, 다른 경로가 잡혀있었다.)

 

해결방법

 

1. Window -> Preferences -> Maven -> User Settings 의 Local Repository 경로를 확인한다.

2. setting.xml 파일을 열어 <localRepository> 태그안의 경로를 확인한다. 

3. 경로가 1번의 Local Repository와 다른 경우 수정해준다.

4. repository 폴더를 비우고 Maven Update를 진행한다. (Alt + F5)

5. Project -> Clean을 진행한다.

 

이 후 서버 실행해보면 해결!

반응형

댓글