简体   繁体   English

Scala Play 2.3.5-Coveralls sbt插件java.io.IOException:无法下载JavaScript

[英]Scala Play 2.3.5 - Coveralls sbt plugin java.io.IOException: Unable to download JavaScript

I am currently trying to setup a play scala project buildchain with travis, heroku and coveralls sbt plugin for codecoverage. 我目前正在尝试使用travis,heroku和工作服sbt插件来建立play scala项目buildchain,以实现代码覆盖率。 I have created a clean scala play app with the activator and just added the coveralls plugin and a travis.yml. 我已经使用激活程序创建了一个干净的scala play应用程序,并刚刚添加了工作服插件和travis.yml。

When I push my project and trigger the build I get the following exception while travis runs the tests: 当我推送项目并触发构建时,在travis运行测试时遇到以下异常:

[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. 我发现这个旧主题( https://groups.google.com/forum/#!topic/play-framework/yj4NT3BO0Os )带有相同的错误消息,但不幸的是,那里的解决方案都不适合我。

Does anyone here use coveralls or know a solution for my problem? 这里有人使用工作服或知道解决我的问题的方法吗? I ve attached all configuration files. 我已经附上了所有配置文件。

build.sbt 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: 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 travis.yml

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

The issue is with sbt-scoverage and has been fixed in release 1.0.0. 该问题与sbt-coverage有关,已在1.0.0版中修复。 Please note that you have to update the way you use the plugin, so refer to the setup guide on the readme. 请注意,您必须更新使用插件的方式,因此请参阅自述文件上的安装指南。

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

The error says you are getting an HTTP 404 (Not Found) error: 该错误表明您收到HTTP 404(未找到)错误:

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

so I'm thinking this isn't so much a problem with your tools but just simply a plain old "not found" issue. 因此,我认为这不是您的工具存在的问题,而仅仅是一个普通的“未找到”问题。 Do you have an assets/javascripts/hello.js file in your project? 您的项目中是否有asset / javascripts / hello.js文件?

It seems that this is an issue with the sbt-scoverage plugin and play. 看来这是sbt-scoverage插件和播放的问题。 I hope that this issue will be resolved in the future... 我希望这个问题将来能解决...

https://github.com/scoverage/sbt-scoverage/issues/52 https://github.com/scoverage/sbt-scoverage/issues/52

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 运行sbt失败 - java.io.IOException:设备上没有剩余空间 - Running sbt fails - java.io.IOException: No space left on device 从 ensime 运行 sbt 时出现 java.io.IOException? - java.io.IOException when running sbt from ensime? java.io.IOException:无法运行程序“ scala”:CreateProcess错误= 2, - java.io.IOException: Cannot run program “scala”: CreateProcess error=2, java.io.IOException:方案的无文件系统:hdfs - java.io.IOException: No FileSystem for scheme : hdfs 在windwos中,scala本地构建失败,出现java.io.IOException:无法运行程序“哪个”错误 - scala-native build failed in windwos with java.io.IOException: Cannot run program “which” error 读取文件时 scala 项目出错:原因:java.io.IOException:方案没有文件系统:文件 - Error in scala project while reading file : Caused by: java.io.IOException: No FileSystem for scheme: file SBT发布未将jar文件上传到工件(发布)java.io.IOException:对URL的PUT操作失败,状态码为400:错误的请求 - SBT publish is not uploading jar file to artifactory (publish) java.io.IOException: PUT operation to URL failed with status code 400: Bad Request scala-devel文件夹权限如果用户不是root用户并且tmp文件夹具有受限访问权限,则出现问题-java.io.IOException:权限被拒绝 - scala-devel folder persmission Issue if the user is not root user and tmp folder has limited access - java.io.IOException: Permission denied Hadoop:java.io.IOException:传递删除或放置 - Hadoop : java.io.IOException: Pass a Delete or a Put Spark&hbase:java.io.IOException:对等重置连接 - Spark&hbase: java.io.IOException: Connection reset by peer
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM