미니옵빠의 code stubs

MAVEN Site plugin - ArtifactNotFoundException: The skin does not exist 오류 해결 방법 본문

Tools/Maven

MAVEN Site plugin - ArtifactNotFoundException: The skin does not exist 오류 해결 방법

미니옵빠 2010. 1. 31. 18:02

평상시 CI 서버에서 잘 BUILD 되던 프로젝트가 갑자기 에러를 일으켰습니다.
에러 메시지는 아래와 같은데요, 아마도 maven site plugin 에 뭔가 이상이 생긴 것 같습니다.

[INFO] [site:site {execution: default-site}]
[INFO] Parent project loaded from repository.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] SiteToolException: ArtifactNotFoundException: The skin does not exist: Unable to determine the release version

Try downloading the file manually from the project website.

Then, install it using the command:
    mvn install:install-file -DgroupId=org.apache.maven.skins -DartifactId=maven-default-skin -Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
    mvn deploy:deploy-file -DgroupId=org.apache.maven.skins -DartifactId=maven-
default-skin -Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  org.apache.maven.skins:maven-default-skin:jar:RELEASE


ArtifactNotFoundException 라..  왜 skin 이 없다고 나올까요?
 

힌트는 제일 아래의 에러 메시지에 있습니다.

org.apache.maven.skins:maven-default-skin:jar:RELEASE

maven-default-skin:jar 의 RELEASE 버전 library 가 없는 것 같습니다.
maven repository를 뒤져보니, RELEASE 버전은 존재하지도 않는데,
제 local repository를 뒤져보니, RELEASE 버전의 폴더가 존재합니다! 게다가 속은 비어있습니다. 이게 원인이었네요.

그래서 local repository 에서 maven skin 관련 library를 모두 삭제했습니다.  (~/.m2/repository/org/apache/maven/skins/maven-default-skin)
그리고 다시 build를 했더니 정상적으로 동작합니다.

그나저나 해당 library와 관련된 repository 내 pom 파일을 확인하지 않고 지워버렸더니, 왜 RELEASE 폴더가 생겼는지 확인이 안 되는군요. 중간에 뭔가 잘못된 RELEASE 버전이 배포된 것이 아닐까요? 그리고 더 웃긴 건, 왜 가끔가다 한번씩은 build 성공을 했을까요? 참 미스테리합니다.

참고로, 이런 비슷한 류의 maven 에러는 대부분 local repository의 library를 삭제 후, 빌드를 통해 다시 다운로드 받으면 거의다 해결됩니다 :)