I want to use the REST Assured library - https://code.google.com/p/rest-assured/ - for testing REST components of a Play application.
I added the REST Assured dependency to Build.scala -
val appDependencies = Seq(
// Add your project dependencies here,
javaCore,
javaJdbc,
javaEbean,
"com.jayway.restassured" % "rest-assured" % "1.8.0" % "test"
)
And added some import statement to my ApplicationTest.java file -
import static com.jayway.restassured.RestAssured.*;
import static com.jayway.restassured.matcher.RestAssuredMatchers.*;
import static org.hamcrest.Matchers.*;
I have errors in my ApplicationTest.java file for these three import statements even though I have added the dependency in Build.scala - "Cannot resolve symbol"
I cannot run my Play app or the tests and I get the following errors in the Messages - Make/Compile window -
Compilation completed with 14 errors and 0 warnings in 3 sec
14 errors
0 warnings
scala: warning: [options] bootstrap class path not set in conjunction with -source 1.6
scala: C:\Users\I013114\Development\my_workspace\my_application\test\ApplicationTest.java:21: error: package com.jayway.restassured does not exist
scala: import static com.jayway.restassured.RestAssured.*;
scala: C:\Users\I013114\Development\my_workspace\my_application\test\ApplicationTest.java:22: error: package com.jayway.restassured.matcher does not exist
scala: import static com.jayway.restassured.matcher.RestAssuredMatchers.*;
scala: C:\Users\I013114\Development\my_workspace\my_application\test\ApplicationTest.java:23: error: cannot find symbol
scala: import static org.hamcrest.Matchers.*;
scala: symbol: class Matchers
scala: location: package org.hamcrest
The "run", "test" and "compile" commands work without any errors if I use my app from the command line, the problem only appears with IntelliJ. I am using IntelliJ 12.1.1 and Play 2.1.0. What could be causing this problem and how can I fix it?