尝试将jasperreports添加到框架2.2.0时未解决的依赖项

时间:2014-01-22 17:17:36

标签: playframework jasper-reports playframework-2.0 repository sbt

我想将jasperreports库添加到我的play framework 2.2.0应用程序中。在我的Build.sbt中,我添加了以下行:

resolvers ++= Seq(
Resolver.url("Objectify Play Repository", url("http://schaloner.github.io/releases/"))(Resolver.ivyStylePatterns),
Resolver.url("Objectify Play Snapshot Repository", url("http://schaloner.github.io/snapshots/"))(Resolver.ivyStylePatterns)

libraryDependencies ++= Seq(
  javaJdbc,
  javaEbean,
  cache,
  "commons-io" % "commons-io" % "2.4",
  "mysql" % "mysql-connector-java" % "5.1.27",
  "be.objectify" %% "deadbolt-java" % "2.2-RC3",
  "net.sf.jasperreports" % "jasperreports"  % "5.5.0"
)
play.Project.playJavaSettings

但是在构建时,我收到以下错误:

[info] Resolving com.lowagie#itext;2.1.7.js2 ...
[warn]  module not found: com.lowagie#itext;2.1.7.js2
[warn] ==== local: tried
[warn]   /home/rook/play-2.2.0/repository/local/com.lowagie/itext/2.1.7.js2/ivys/ivy.xml
[warn] ==== Maven2 Local: tried
[warn]   file:/home/rook/.m2/repository/com/lowagie/itext/2.1.7.js2/itext-2.1.7.js2.pom
[warn] ==== sonatype-oss-snapshots: tried
[warn]   http://oss.sonatype.org/content/repositories/snapshots/com/lowagie/itext/2.1.7.js2/itext-2.1.7.js2.pom
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/com/lowagie/itext/2.1.7.js2/itext-2.1.7.js2.pom
[warn] ==== Objectify Play Repository: tried
[warn]   http://schaloner.github.io/releases/com.lowagie/itext/2.1.7.js2/ivys/ivy.xml
[warn] ==== Objectify Play Snapshot Repository: tried
[warn]   http://schaloner.github.io/snapshots/com.lowagie/itext/2.1.7.js2/ivys/ivy.xml
[warn] ==== com.lowagie#itext;2.1.7.js2: tried
[warn] ==== Typesafe Releases Repository: tried
[warn]   http://repo.typesafe.com/typesafe/releases/com/lowagie/itext/2.1.7.js2/itext-2.1.7.js2.pom
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.lowagie#itext;2.1.7.js2: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::

我该怎么做才能解决这个问题?我已经读过,如果我添加一个特定的jasperreport repositoryt(即:http://jasperreports.sourceforge.net/maven2),问题就会解决,但我不知道如何将第三方存储库添加到Build.sbt文件中。有什么想法吗?

1 个答案:

答案 0 :(得分:3)

添加到您的build.sbt:

resolvers += "Jasper" at "http://jasperreports.sourceforge.net/maven2" 

或者使用Seq再添加一个条目。