我想将 Apache jena 添加为我的 play framework 2.0 项目的依赖项。
我遵循了我找到的教程 here .我似乎无法找到正确的下载解析器
val appDependencies = Seq(
// Add your project dependencies here,
"jena.apache.org" % "jena" % "2.10.1" % "test"
)
val main = play.Project(appName, appVersion, appDependencies).settings(
// Add your own project settings here
resolvers += ***"apache-jena-2.10.1.zip" at "http://www.apache.org/dist/jena/binaries/"***
)
The "resolvers +=..." part seems to be what I have done wrong. Yet I can't find any solutions.
最佳答案
您根本不必添加存储库。这些工件位于 maven central repo 中.
只需将您的依赖更改为:
val appDependencies = Seq(
// Add your project dependencies here,
"org.apache.jena" % "apache-jena-libs" % "2.10.1" % "test"
)
然后删除您尝试放入存储库的部分,使其看起来像这样:
val main = play.Project(appName, appVersion, appDependencies).settings(
// Add your own project settings here
)
如果你想在你的主代码中使用 Jena 库(不仅仅是在单元测试中),那么去掉依赖的 test
部分,像这样:
val appDependencies = Seq(
// Add your project dependencies here,
"org.apache.jena" % "apache-jena-libs" % "2.10.1"
)
关于playframework - 将 Jena 添加到 Play Framework 2.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17068232/