Software Development/Big Data

hadoop wordcount 예제 eclilpse maven build 시 발생하는 오류

루ㅌ 2020. 7. 1. 12:33

우선 maven build 전 maven clean을 해주셔야 합니다. 

플젝 우클릭 'Run As' 에 Maven clean을 클릭하시면 됩니다.

 

그리고 maven build를 했지만 아래와 같은 에러를 만났습니다.

 

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]

 

아래의 링크에 있는 대로 

https://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException

 

NoGoalSpecifiedException - Apache Maven - Apache Software Foundation

Well, this just tells you that Maven has no idea what it should do. In general, you have the following options to perform build steps: Invoke a lifecycle phase, e.g. This runs the lifecycle phase install and all its predecessor phases like compile and test

cwiki.apache.org

pom.xml에 

 

build에 <defaultGoal>install</defaultGoal> 추가 

<build>

    <defaultGoal>install</defaultGoal>

</build>

 

이렇게 해주시면 됩니다.

 

<defaultGoal>은 아무것도 지정하지 않은 goal의 실행시 실행되는 목적 install, clean, package, build등을 정합니다.