ezoic

Tuesday, April 18, 2017

If you want to use assembly sbt, how to do it and the layout and the error fix

The way to build sbt package on linux, is first, to make some directories,

myProject/src/main/scala

And under scala, you put sbt file and scala files, and you make a "project" directory under scala, and put build.sbt under "project" directory  which has content:


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
resolvers += Resolver.url("artifactory", url("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases"))(Resolver.ivyStylePatterns)

resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"

resolvers += "Spray Repository" at "http://repo.spray.cc/"

addSbtPlugin("com.eed3si9n" %% "sbt-assembly" % "0.11.2")

resolvers += "jitpack" at "https://jitpack.io"


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

And I found the error after I "sbt package" under "scala" directory



- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
module not found: com.eed3si9n#sbt-assembly;0.11.2

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

Some ppl said that it was because, you did not put correct scalaVersion there. 

But I found that if I "sudo yum update", I resolved the problem. 

So when you use the linux, first thing to do is to "sudo yum update",  this is for red hat. for other linux, try 
"sudo apt-get update". 






No comments:

Post a Comment

looking for a man

 I am a mid aged woman.  I was born in 1980. I do not have any kid. no complicated  dating before . I am looking for a man here for marriage...