✔ 문제 상황
STS에서 새 프로젝트 생성 후 pom.xml을 열었더니 다음과 같은 에러문구가 떴다.
*STS 버전: 4.20.0
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
에러 문구
Line 2. error
Line 3. error
✔ 해결 방법
두 가지 방법 중 택1하면 된다.
방법 1. 링크 주소값 수정
xsi:schemaLocation 값 중 https에서 's'를 삭제하여 http로 수정해주면 에러 표시가 사라진다.
방법 2. 소스 강제 다운로드
에러 밑줄이 있는 곳에 마우스를 가져다 대면 해당 링크에서 강제 다운로드할 수 있는 안내창이 뜬다.
'Force download of...' 문구를 클릭해주면 링크 주소를 수정하지 않아도 에러 표시가 사라진다.
주소창에 http://maven.apache.org/xsd/maven-4.0.0.xsd 로 입력해도 https로 리다이렉션이 일어나는걸 보면 기본값인 https 주소가 맞는 것 같다. 해당 https 주소로 소스 강제 다운로드도 잘 됐고... 스택오버 플로우에서는 http인 상태에서 에러가 나 https로 변경하여 에러를 해결한 케이스도 여럿 있었다. 그런데 왜 https 주소를 disabled라고 인식할까...
👀 참고