이클립스에서 A resource exists with a different case 오류가 발생할 때

정확한 메시지는 아래와 같음

Description    Resource    Path    Location    Type
The project was not built due to "A resource exists with a different case: '/****'.". Fix the problem, then try refreshing this project and building it since it may be inconsistent    ****        Unknown    Java Problem

Ant로는 컴파일이 되는데,이클립스에서 계속 Problems에 Error라고 표시한다.

찾아보니, 이클립스에서는 패키지 네임을 소문자로 작성해야 한다고 한다. 그리고 Java Spec에서도 찾아보니 아래와 같이 package name은 소문자로 강제하고 있음.

The first component of a unique package name is always written in all-lowercase ASCII letters and should be one of the top level domain names, currently com, edu, gov, mil, net, org, or one of the English two-letter codes identifying countries as specified in ISO Standard 3166, 1981. For more information, refer to the documents stored at ftp://rs.internic.net/rfc, for example, rfc920.txt andrfc1032.txt.

그리고 eclipse에서 svn을 쓰는 사용자들에게 팁. MS Windows의 경우, 파일의 대소문자를 구분하지 않는데 반해, svn에서는 대소문자를 구별하기 때문에, 뭔가 꼬일 가능성이 있다.
그러므로 안전하게 아래와 같은 방법을 따르자.
1. eclipse에서 대문자 package명을 바로 소문자로 바꾸고, 뒤에 의미없는 숫자를 추가하여 refactoring
2. svn commit
3. eclipse에서 아까 추가한 숫자를 다시 제외하도록 refactoring
4. svn commit
끝!

 
description : 기술, 서술적 묘사, 서술, 기재, 서사문

댓글

Designed by JB FACTORY