Skip to content
forked from sbt/sbt-assembly

sbt plugin to deploy a scoobi program in a self contained deployable jar

License

Notifications You must be signed in to change notification settings

NICTA/sbt-scoobi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deprecated

This project is now deprecated. Please see Scoobi's userguide on using how to use sbt-assembly.

sbt-scoobi

sbt-scoobi is an sbt plugin that allows you to build self contained jars ready to use with

Version

0.0.1

How To Use

Create a file at $PROJECT_ROOT/project/plugins.sbt:

resolvers += "Sbt Scoobi" at "http://nicta.github.com/sbt-scoobi/repository/"

addSbtPlugin("com.nicta" %% "sbt-scoobi" % "0.0.1")

Now from sbt you will have a new package-hadoop task which will compile your project, run your tests, and then pack your class files and all your dependencies into a single JAR file: target/scala_X.X.X/projectname-hadoop-X.X.X.jar.

This jar is ready to send to haddop, using "hadoop jar projectname-hadoop-X.X.X.jar"

Note: There is currently an undiagnosed issue in which there is an error finding "scala.math" from inside javassist. This appears to be a Mac specific issue, and a work around exists. Set $HADOOP_CLASSPATH to the name of the built jar, then run hadoop by passing in the name of the object with a main function to execute. e.g.

    # mac workaround
    $ export HADOOP_CLASSPATH=/path/to/WordCount-haddop-0.1.jar
    $ hadoop ExamplesMainObjectToRun

Other options

There are a few extra options you can use in your build.sbt, to:

  • To change jar name:

      ScoobiKeys.jarName := "newName.jar"
    
  • Don't run tests when building jar:

      ScoobiKeys.test := {}
    
  • If sbt is unable to correctly detect the intended main function to execute when the jar is run, you can tell it (make sure the NameOfTheClass is fully qualified)

      mainClass := Some("NameOfTheClass")
    

License

Copyright (c) 2010-2011 e.e d3si9n, Coda Hale

Published under The MIT License, see LICENSE

About

sbt plugin to deploy a scoobi program in a self contained deployable jar

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 100.0%