Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding Jena to Play Framework 2.0

I want to add Apache jena as a dependency to my play framework 2.0 project.

I followed a tutorial I found here. I can't seem to find the correct resolver for a download

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.
like image 826
Aleks G Avatar asked Feb 20 '26 07:02

Aleks G


1 Answers

You don't have to add the repository at all. The artifacts are found in the maven central repo.

Just change your dependency to this:

val appDependencies = Seq(
  // Add your project dependencies here,
  "org.apache.jena" % "apache-jena-libs" % "2.10.1" % "test"
)

And remove the part where you tried to put in the repository so it looks like this:

val main = play.Project(appName, appVersion, appDependencies).settings(
  // Add your own project settings here      
)

If you want to use the Jena library in your main code (not only in unit tests) then strip the test part of the dependencies, like this:

val appDependencies = Seq(
  // Add your project dependencies here,
  "org.apache.jena" % "apache-jena-libs" % "2.10.1"
)
like image 134
maba Avatar answered Feb 23 '26 22:02

maba



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!