Newbie: trouble with eclipse dynamic web project and dependency

I have found a lot of articles that talk about how to set up a new gradle project so that i can use it with tomcat with in eclipse. Basically they suggest you start by creating a new dynamic web project and then write a small build.gradle file. following this approach I re-import my project into eclipse and index.jsp it works as expected.

Now when I try to create a restful service, eclipse can not compile it complains ’the import can not be found’

I have tried a ton of different dependencies. I think the problem is when I look at the libraries in eclipse I do not see my added dependencies. When I look at regular gradle projects in eclipse I see ‘projects and external dependencies’ folder. My dynamic web project does not seem to have anything like that

$ gradlew clean war

works how ever eclipse still complains? I have tried deleting and re-importing several times

here are the plugins I am using

apply plugin: 'java’
apply plugin: ‘war’
//‘com.bmuschko.tomcat’ supports deploying to tomcat
apply plugin: ‘com.bmuschko.tomcat’

//eclipse-wtp provides support for dynamic web projects in eclipse
apply plugin: ‘eclipse-wtp’

Here are the various dependency combinations I have tried
the always complile from the command line.

// dependencies to run on tomcat, are mandatory for tomcat plugin
dependencies {
def tomcatVersion = '8.0.18’
tomcat “org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}”,
tomcat(“org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}”) {
exclude group: ‘org.eclipse.jdt.core.compiler’, module: ‘ecj’

compile project(':kRank')

// //
// compile group: ‘org.glassfish.jersey.core’, name: ‘jersey-common’, version: ‘2.23.2’
// //
// compile group: ‘org.glassfish.jersey.core’, name: ‘jersey-client’, version: ‘2.23.2’
// // TODO do we need jersery-server?
// //
// compile group: ‘org.glassfish.jersey.core’, name: ‘jersey-server’, version: ‘2.23.2’

// //
// compile group: ‘com.sun.jersey’, name: ‘jersey-bundle’, version: ‘1.19.2’

// /
// //

// compile group: ‘’, name: ‘’, version: ‘2.0.1’
// // //
// compile group: ‘org.glassfish.jersey.containers’, name: ‘jersey-container-servlet’, version: ‘2.23.2’
// // ://
// compile group: ‘javax.servlet’, name: ‘javax.servlet-api’, version: ‘3.1.0’

// //
compile ""
compile "org.glassfish.jersey.core:jersey-server:2.23.2"
compile "org.glassfish.jersey.containers:jersey-container-servlet:2.23.2"
compile ""
//providedCompile "javax.servlet:javax.servlet-api:3.1.0"
compile "javax.servlet:javax.servlet-api:3.1.0"


$ …/gradlew --version

Gradle 2.12

Build time: 2016-03-14 08:32:03 UTC
Build number: none
Revision: b29fbb64ad6b068cb3f05f7e40dc670472129bc0

Groovy: 2.4.4
Ant: Apache Ant™ version 1.9.3 compiled on December 23 2013
JVM: 1.8.0_66 (Oracle Corporation 25.66-b17)
OS: Mac OS X 10.11.6 x86_64

Any suggestions would be greatly appreciated

Did you ever figure this out or get a solve, I’m looking at a similar issue.