我不确定这是一个错误还是我以某种方式激活过的东西。基本上我有Play Framework应用程序,当我在根文件夹中有package.json
文件时,它不喜欢运行测试。当我只是run
应用时,一切运行正常。我没有找到与我有同样问题的人。
当test
不存在时,在sbt内运行package.json
可以正常运行。如果存在package.json
,则SBT开始将这些依赖项安装/下载到/node_modules
,它们会破坏我已安装的npm模块。之后我必须重新安装才能让我的npm模块再次运行。
这是我在控制台中多次收到的错误消息。
Exception in thread "Trireme Async Pool" java.security.AccessControlException: access denied ("java.io.FilePermission" "/home/anders/vidme/node_modules/grunt-ts/node_modules/.bin/rimraf" "readlink")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:372)
at java.security.AccessController.checkPermission(AccessController.java:559)
at sun.nio.fs.UnixFileSystemProvider.readSymbolicLink(UnixFileSystemProvider.java:487)
at java.nio.file.Files.readSymbolicLink(Files.java:1384)
at io.apigee.trireme.core.modules.AsyncFilesystem$FSImpl.doReadLink(AsyncFilesystem.java:1470)
at io.apigee.trireme.core.modules.AsyncFilesystem$FSImpl.access$2000(AsyncFilesystem.java:118)
at io.apigee.trireme.core.modules.AsyncFilesystem$FSImpl$26.execute(AsyncFilesystem.java:1459)
at io.apigee.trireme.core.modules.AsyncFilesystem$FSImpl$1.run(AsyncFilesystem.java:201)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
package.json
{
"devDependencies": {
"grunt": "~0.4.5",
"grunt-ts": "~4.0.1",
"grunt-contrib-uglify": "~0.9.1",
"grunt-contrib-watch": "~0.6.1",
"grunt-contrib-htmlmin": "~0.4.0"
}
}
build.sbt
name := """vidme"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
scalaSource in Compile := baseDirectory.value / "app"
scalaSource in Test := baseDirectory.value / "test"
sourcesInBase := false
scalaVersion := "2.11.1"
libraryDependencies ++= Seq(
jdbc,
anorm,
cache,
ws,
"org.reactivemongo" %% "play2-reactivemongo" % "0.10.5.0.akka23",
"org.mongodb" %% "casbah" % "2.8.0",
"org.scalatest" % "scalatest_2.11" % "2.2.4" % "test",
"com.google.inject" % "guice" % "3.0"
)
无论如何我可以阻止这种情况发生吗?我尝试在我的sbt文件中添加scalaSource
,但这没有任何改变。