Scala - Development

I have developed the Word Count program using Sbt… However, I am unable to generate the .jar file like how I have developed using Maven.

Do anyone have steps to create jar file using SBT.

Thanks in advance for your response.

sbt package will help

Hi thank you for your response.

sbt compile

sbt run

sbt package

I have used above three commands… however, what is the location of .jar file…

I have found the .jar file under bin file…

Some it is not working under my stand alone cluster…

I am trying to upload with labs.iteversity.com cluster now for further testing…

Hi , I have got the solution. The jar file creates under Target folder when you use sbt package.

It is working fine under cluster on labs.itversity.com

it should be in target -> scala directory

the file structure in jar as follows:

D:\scala-learning-projects\sparkapi\target\scala-2.11>jar tvf sparkapi_2.11-1.0.jar
273 Sun Mar 19 11:37:58 CET 2017 META-INF/MANIFEST.MF
0 Sun Mar 19 11:37:58 CET 2017 wordcount/
55 Sun Mar 19 01:12:04 CET 2017 application.properties
1385 Sun Mar 19 11:36:38 CET 2017 wordcount/wcount$$anonfun$2.class
593 Sun Mar 19 11:36:38 CET 2017 wordcount/wcount.class
2620 Sun Mar 19 11:36:38 CET 2017 wordcount/wcount$.class
1124 Sun Mar 19 11:36:38 CET 2017 wordcount/wcount$$anonfun$1.class
1275 Sun Mar 19 11:36:38 CET 2017 wordcount/wcount$$anonfun$3.class
1500 Sun Mar 19 11:36:38 CET 2017 wordcount/wcount$$anonfun$main$1.class

Thank you. :slight_smile: