spark - python - R

scala + java + maven project packge

iamksu 2018. 2. 21. 15:40

□ 참고


 ▶ https://github.com/sonatype/m2eclipse-scala/tree/master/samples/prj-liftbased/


 ▶ http://ryancompton.net/2014/05/19/sample-pomxml-to-build-scala--jar-with-dependenciesjar/

 

 ▶ https://maven.apache.org/plugins/maven-assembly-plugin/usage.html


 ▶ http://davidb.github.io/scala-maven-plugin/example_java.html






□ scala + java + maven + eclipse 개발 환경


 ▶사전 작성된 게시물 참고


 ▶추가 설치 (eclipse - help - install new software...)

 






□ 프로젝트 생성


 ▶ maven project 생성 후 src/main/scala 위치의 source 폴더 생성




 ▶ pom.xml 내용 추가 ( scala-maven-plugin )

 





□ java example


 ▶ 리스트에 데이터를 담아서 넘겨주고 이를 scala에서 사용하는 간단 예제







□ scala example


▶리던 받은 리스트에 데이터를 추가 및 확인






□ package

 




 ▶ 완료 후 jar파일 생성 확인







□terminal로 실행


 



끝~