[Java/자바 기초] Maven No goals have been specified for this build Error
메이븐 빌드를 하면 아래와 같은 에러에 봉착합니다...ㅠㅠ
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: 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-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException
번역기를 돌려 보면 빌드에는 목표가 지정되어 있지 않아서 에러가 생기는 걸 알수있습니다.
따라서 pom.xml 에 아래와 같이 추가하여 주시면 에러가 사라집니다.
<defaultGoal>install</defaultGoal> 이와 같이 빌드의 목표를 지정해 주시면 됩니다.
물론 케이스 바이 케이스 라 저는 이렇게 해결했습니다!!