신나게 스프링프레임워크로 프로젝트 작성하면서 pom.xml을 변경하고, 어플리케이션을 멈췄다가 다시 실행시켰더니 계속 이런 에러가 뜨는 것이었다.. 🤯
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format : or :[:]:. Available lifecycle phases are: pre-clean, clean, post-clean, validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-site, site, post-site, site-deploy. -> [1m[Help 1][m
[ERROR][ERROR] To see the full stack trace of the errors, re-run Maven with the [1m-e[m switch.
[ERROR] Re-run Maven using the [1m-X[m switch to enable full debug logging.
[ERROR][ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [1m[Help 1]
찾아보니, Maven 프로젝트 설정 시 위와 같은 에러가 난다는데, 목표 설정을 해주지 않아서 발생하는 에러라고 한다.
해결방법 또한 생각보다 간단했다.
pom.xml에 다음과 같은 의존성만 주입해주면 해결된다.
<build>
<defaultGoal>install</defaultGoal>
</build>