I am trying to use a library called REST Assured with the Play Framework. The documentation - https://code.google.com/p/rest-assured/wiki/GettingStarted - gives the following artifact for Maven -
<dependency>
<groupId>com.jayway.restassured</groupId>
<artifactId>rest-assured</artifactId>
<version>1.8.0</version>
<scope>test</scope>
</dependency>
So I altered my Build.scala file as follows to include this dependency -
val appDependencies = Seq(
// Add your project dependencies here,
javaCore,
javaJdbc,
javaEbean,
"com.jayway.restassured" % "rest-assured" % "1.8.0" % "test"
)
Then I try and use this library in a Java by statically importing some packages, which is what the documentation instructs me to do -
import static com.jayway.restassured.RestAssured.*;
import static com.jayway.restassured.matcher.RestAssuredMatchers.*;
import static org.hamcrest.Matchers.*;
But this results in an Compilation error when I try and run the Play application -
error: package com.jayway.restassured does not exist
I know that Play/sbt is retrieving the dependency because I can see a "com.jayway.restassured" directory in the play-2.1.0/repository/cache directory. However it is not showing in the play-2.1.0/repository/local directory, I don't know if that has any significance.
So what's going wrong, why can't I access this library in my Play application?