3

我想添加jasperreports庫到我的播放框架2.2.0應用程序。在我Build.sbt,我已經添加了以下行:試圖添加jasperreports播放框架時未解決的依賴關係2.2.0

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 repository(即:http://jasperreports.sourceforge.net/maven2),問題將得到解決,但我不知道如何將第三方存儲庫添加到Build.sbt文件。有任何想法嗎?

+1

我加入 「com.lowagie」 % 「iText的」 % 「2.1.7」 之前 「net.sf.jasperreports」 % 「JasperReports的」 % 「5.5.0」 線解決了這個問題。但我仍然想知道是否有其他解決方法,即通過操縱解析器。 – jrook

回答

3

添加到您的build.sbt:

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

或用一個條目使用序列。

+0

沒有。玩只是給出這個錯誤: [警告] ====賈斯珀:試過 正如我所說,我已經解決了這個問題,通過添加iText庫的依賴。我想知道是否可以使用解析器來避免添加依賴項。 – jrook

+0

解析器只是存儲庫的一種方式。你需要確定你指的是正確的。 – hcura

+0

另外,這種依賴關係有一個奇怪的分類器,對於依賴關係解析模式來說它不是很好(.js2)。您的解決方案可以使用 – hcura