Mik378
Mik378

Reputation: 22191

Adding a managed dependency to Play 2 app

I want to add Jersey-client to my Play 2 app using SBT.

So, I added the dependency into my ApplicationBuild.scala file as follows:

object ApplicationBuild extends Build {

  val appName = "wealcome-webapp"
  val appVersion = "1.0-SNAPSHOT"

  val appDependencies = Seq(
    // Add your project dependencies here,
    jdbc,
    anorm,
    "com.sun.jersey" % "jersey-client" % "1.16"
  )

  val main = play.Project(appName, appVersion, appDependencies).settings(
    scalaVersion := "2.10.0"
  )

}

So, in command-line I make : play reload update.

Thus, I expect to find Jersey's jars file into play-2.1-RC1/repository/local. However, I find jars into play-2.1-RC1/repository/cache.

What should I do to make automatically the dependency goes into the local folder in order to expect my app to compile?

Is it normal to find jars file into the cache folder? What is exactly the role of cache?

Upvotes: 2

Views: 1829

Answers (1)

Mike McFarland
Mike McFarland

Reputation: 657

If you are using an IDE make sure to run play eclipsify or play idea after making changes to your dependencies. Afterwards refreshing the project may be necessary. Then the class paths for the project files will be updated appropriately. Only SBT will be aware of your changes before you do this.

Upvotes: 4

Related Questions