I am trying to get the ant4sbt plugin to work with play. It works for compilation and production modes, but it throws an error when I try to run "activator test", and I have no idea how to debug it. Could anyone check my build.sbt and tell me if I am doing something obviously wrong, or this is the issue I need to file with the plugin maintainer.
The minimal example for what I set up is to take a play-java template, add addSbtPlugin("de.johoop" % "ant4sbt" % "1.1.2") to plugins.sbt, and then add the external ant task
----
name := """tested"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayJava)
scalaVersion := "2.11.1"
libraryDependencies ++= Seq(
javaJdbc,
javaEbean,
cache,
javaWs
)
antSettings
antBuildFile := baseDirectory.value / "external-ant-tasks.xml"
addAntTasks("all")
compile <<= (compile in Compile) dependsOn antTaskKey("all")
-----
"activator compile" and "activator run" both work. But "activator test" fails with
-----
[info] Compiling 2 Java sources to /disk/scratch/tmp/tested/target/scala-2.11/test-classes...
java.util.NoSuchElementException: None.get
at scala.None$.get(Option.scala:313)
at scala.None$.get(Option.scala:311)
at com.typesafe.sbt.web.SbtWeb$.withActorRefFactory(SbtWeb.scala:441)
at com.typesafe.sbt.jse.SbtJsTask$.executeJs(SbtJsTask.scala:396)
at com.typesafe.sbt.mocha.SbtMocha$$anonfun$4$$anonfun$apply$6.apply(SbtMocha.scala:162)
at com.typesafe.sbt.mocha.SbtMocha$$anonfun$4$$anonfun$apply$6.apply(SbtMocha.scala:135)
at com.typesafe.sbt.mocha.SbtMocha$$anonfun$projectSettings$8.apply(SbtMocha.scala:80)
at com.typesafe.sbt.mocha.SbtMocha$$anonfun$projectSettings$8.apply(SbtMocha.scala:80)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
at sbt.std.Transform$$anon$
4.work(System.scala:64)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at
sbt.Execute.work(Execute.scala:244)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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)
[error] (*:mochaExecuteTests) java.util.NoSuchElementException: None.get
-----
Thanks
Myrosia