Why does running tests through jenkins user on build slave fail with Missing scala-library.jar? Why does running tests through jenkins user on build slave fail with Missing scala-library.jar? jenkins jenkins

Why does running tests through jenkins user on build slave fail with Missing scala-library.jar?


I had a similar problem a couple of weeks ago. If I recall the circumstances correctly, my SBT build utilized the coursier plugin (resulting in a ~/.coursier%HOME%\.coursier on Windows—directory being created and maintained by the build) and I was also using a local artifact repository (Nexus OSS, in my case).

My problem turned out to be the version of the coursier plugin that my build was using. If you're using coursier v1.0.0-RC2 (or possibly v1.0.0-RC3) or earlier, then this might explain your problem.

The solution was to delete the .coursier and .ivy2 directories (which cache some artifacts locally), change the version of coursier to V1.0.0-RC4 or later, and re-try the build. (In your case, these directories would be on your Jenkins server, in the jenkins account home.)


looks like the library path with root user is pointing to .cache.did you try by clearing the cache.

And also can you try by executing the below command got from

https://github.com/sbt/sbt-assembly

assemblyOption in assembly := (assemblyOption in assembly).value.copy(includeScala = true)