Question

I have a SBT project on VirtualBox virtual machine where I have installed SBT and have my project located. I run project through virtual machine with sbt, so all the external jars are located in /root/.ivy2/ in the VM.

I have also mounted all VM drive with sshfs and routed to external jars from host as ~/dev/remote/project/root/.ivy/.

I use Eclipse/ScalaIDE from host machine, so when I open project, the IDE can't find the external jars.

How to tell Eclipse to use these jars automatically or how to work with Eclipse and projects on VM?

Was it helpful?

Solution

sbteclipse was not created to support this use case. It might be possible to tweak the sbt settings used by the eclipse command, but you will have to dig in sbt.

Otherwise, you can create a simple sh script to "fix" the file every time your dependencies change:

sed -i 's%"/root/.ivy2/%"/home/codez/Dev/remote/wm1/root/.ivy2/%' .classpath

OTHER TIPS

Have you tried to either:

  • modify ivysettings.xml with the cache directive
  • change the sbt script to use the -cache directive
  • change the java invocation to use the -Dsbt.ivy.home directive

To point to the mounted VM ivy cache

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top