Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependencies of SBT are copied to Raspberry, causing conflicts #61

Open
seitfa opened this issue Jun 18, 2016 · 3 comments
Open

Dependencies of SBT are copied to Raspberry, causing conflicts #61

seitfa opened this issue Jun 18, 2016 · 3 comments

Comments

@seitfa
Copy link

seitfa commented Jun 18, 2016

I'm using this Plugin for Scala Development, wich worked fine for some time.

But starting with SBT 0.13, Scala itself gets resolved like a normal lib, see http://stackoverflow.com/questions/22551430/in-sbt-0-13-does-scalaversion-still-control-the-version-of-scala-used-for-compi

When using Scala with this plugin the depentendies of SBT (including conflicting Scala-Version), get copied to the Raspberry and get loaded during executin. SBT ist just the Build-Tool and is not needed an the Raspberry.

This causes errors like this:

Exception in thread "main" java.lang.NoSuchMethodError: scala.Predef$.ArrowAssoc(Ljava/lang/Object;)Ljava/lang/Object; at akka.http.scaladsl.server.directives.LoggingMagnet$.forRequestResponseFromMarker(DebuggingDirectives.scala:69) at Service$class.$init$(AkkaHttpMicroservice.scala:81) at AkkaHttpMicroservice$.<init>(AkkaHttpMicroservice.scala:107) at AkkaHttpMicroservice$.<clinit>(AkkaHttpMicroservice.scala) at AkkaHttpMicroservice.main(AkkaHttpMicroservice.scala)

When executiong the same code localy, this problem does not exist

This problem could be reproduced with:

  • Intellij 2016.1.3
  • Scala-Plugin installed
  • Version 1.20 of this plugin
  • Activator-template "akka-http-microservice".

To work around this problem:

  • Remove "SBT: sbt-and-plugin" from Dependencies under File > Project Structure > Modlues > *-build > Dependencies
  • Delete Target-Folder on PI
@asebak
Copy link
Owner

asebak commented Jun 19, 2016

how would you recommend i fix it programatically?

@seitfa
Copy link
Author

seitfa commented Jun 19, 2016

My only idea is looking at the way it is done when the project get's executed locals => there has to be some difference in determining the Classpath and JARs getting loaded during execution.

@asebak
Copy link
Owner

asebak commented Jun 20, 2016

Yeah that's done in this file: https://github.com/asebak/embeddedlinux-jvmdebugger-intellij/blob/master/src/com/atsebak/embeddedlinuxjvm/services/ClasspathService.java the method is invokeFindDeployedJars you can take a look at it and see if there's an issue with that code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants