Added more robust scala build to allow for future clean releases, and publish settings for later integration. 

Added more robust scala build to allow for future clean releases, and publish settings for later integration. 
Even though `Test.junit` is mentioned here, `sbt test` still does not run junit tests (and it never worked before). Do you have any idea how to run them from sbt?