0

I am currently trying to setup a play scala project buildchain with travis, heroku and coveralls sbt plugin for codecoverage. I have created a clean scala play app with the activator and just added the coveralls plugin and a travis.yml.

When I push my project and trigger the build I get the following exception while travis runs the tests:

[error] c.g.h.h.HtmlPage - Error loading JavaScript from [http://localhost:19001/assets/javascripts/hello.js].
java.io.IOException: Unable to download JavaScript from 'http://localhost:19001/assets/javascripts/hello.js' (status 404).
  at com.gargoylesoftware.htmlunit.html.HtmlPage.loadJavaScriptFromUrl(HtmlPage.java:1106) ~[htmlunit-2.13.jar:2.13]
  at com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1039) ~[htmlunit-2.13.jar:2.13]
  at com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:409) [htmlunit-2.13.jar:2.13]
  at com.gargoylesoftware.htmlunit.html.HtmlScript$3.execute(HtmlScript.java:266) [htmlunit-2.13.jar:2.13]
  at com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:286) [htmlunit-2.13.jar:2.13]

I have found this old topic (https://groups.google.com/forum/#!topic/play-framework/yj4NT3BO0Os) with the same errormessage but unfortunately none of the solutions there worked for me.

Does anyone here use coveralls or know a solution for my problem? I ve attached all configuration files.

build.sbt

import scoverage.ScoverageSbtPlugin.instrumentSettings
import org.scoverage.coveralls.CoverallsPlugin.coverallsSettings

name := """buildchain"""

version := "1.0-SNAPSHOT"

scalaVersion := "2.11.1"

lazy val root = (project in file(".")).enablePlugins(PlayScala)

libraryDependencies ++= Seq(
  jdbc,
  anorm,
  cache,
  ws
)

instrumentSettings

CoverallsPlugin.coverallsSettings

ScoverageKeys.minimumCoverage := 1

ScoverageKeys.failOnMinimumCoverage := true

plugins.sbt:

resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

resolvers += Classpaths.sbtPluginReleases

// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.5")

// web plugins
addSbtPlugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.0")

addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.0.0")

addSbtPlugin("com.typesafe.sbt" % "sbt-jshint" % "1.0.1")

addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.1")

addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.0.0")

addSbtPlugin("com.typesafe.sbt" % "sbt-mocha" % "1.0.0")

// code coverage
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "0.99.7.1")

addSbtPlugin("org.scoverage" %% "sbt-coveralls" % "0.99.0")

travis.yml

language: scala
scala:
  - 2.11.2
script: "sbt coveralls"
notifications:
  email: false
4

3 に答える 3

0

エラーは、HTTP 404 (Not Found) エラーが発生していることを示しています。

java.io.IOException: Unable to download JavaScript from 'http://localhost:19001/assets/javascripts/hello.js' (status 404)

したがって、これはツールの問題ではなく、単純に古い「見つからない」問題だと思います。プロジェクトに assets/javascripts/hello.js ファイルがありますか?

于 2014-10-22T23:33:29.303 に答える