Spring/error

[Spring Error] SpringBoot 프로젝트 생성 후, The declared package "" does not match the expected package ".mvn.wrapper" 에러 해결

MOMOBOB 2021. 1. 28. 20:01
반응형

 

Error

 

SpringBoot에서 프로젝트 생성 후, 아래와 같이 알 수 없는 에러가 발생하였음

 

The declared package "" does not match the expected package ".mvn.wrapper"

 

반응형

 


Solution

 

버전이나개발 환경에 구애받지 않도록 지원하는 Maven Wrapper을 이용하기 위한 스크립트인 mvnw를 실행하는데 해당 패키지가 없어서 발생함.

 

 

cmd 콘솔창에 아래와 같은 명령어를 실행하면 에러는 사라지고 Maven Wrapper는 정상동작함

 

mvn -N io.takari:maven:wrapper

 

 

참고 : 

https://sanghye.tistory.com/34

 

[Spring] Maven Wrapper 설명 및 실행방법

spring 이나 spring boot 로 개발을 진행하신다면 Maven 과 Gradle 과 같은 build tool 을 사용해보신 적이 있으실 겁니다. Maven 이나 Gradle 이 무엇인지는 잘 알고 있지만, Wrapper 는 무엇인지 잘 모르는 경우..

sanghye.tistory.com

 

https://stackoverflow.com/questions/38723833/what-is-the-purpose-of-mvnw-and-mvnw-cmd-files

 

What is the purpose of mvnw and mvnw.cmd files?

When I created a Spring Boot application I could see mvnw and mvnw.cmd files in the root of the project. What is the purpose of these two files?

stackoverflow.com

 

 

 


Thank you!

 

 

반응형