How to use scala-time?

后端 未结 4 2026
野的像风
野的像风 2021-02-15 15:46

somebody know scala-time? (https://github.com/jorgeortiz85/scala-time) Have no idea how to use it. I can download it (on linux) and run sbt but theres always the same errormessa

4条回答
  •  一向
    一向 (楼主)
    2021-02-15 15:59

    This is an sbt version problem, and you might be able to work around it by using a different sbt-launch or by changing the build a bit. I get a similar error if I use sbt-launch-0.10.1.jar for this code, but it works fine if I use sbt-launch-0.7.7.jar.

    I'd suspect you're using sbt-launch-0.11.0, and this is causing sbt to look for a compiled version of sbt that doesn't in fact exist.

    Possible fixes are:

    1. Just use sbt-launch-0.7.7 for this code.
    2. Edit the build.properties file to use a different version of sbt.
    3. Get source for sbt-0.7.4, compile with scala 2.9.1 and stash the result in your local ivy repository with the name and location that's being searched.

    Options 1 and 2 worked for me.

    I haven't done #3 for this, but have done similar things for other code. It can be a bit painful...

    You can have multiple versions of sbt-launch and flip between them depending on the needs of a particular codebase.

    Perhaps someone who knows sbt better than I will post a real solution, but I'm hoping this is at least a little helpful.

提交回复
热议问题