Tomcat within eclipse doesn't recognize Shared project (sub projects) classes

(Marom S) #1

Hi, We are trying to setup a multi project build.

We have 2 projects:

  1. PlayerManager 2) Shared

our project compiles and all the tests succeed when we run the gradle.test task

Problem is when we try to run the project on the tomcat from whithin eclipse we get class not found error for all the files in the Shared project.

Here is our files:

PlayerManager (root) ======================= =======================

apply plugin: ‘war’ apply plugin: ‘jetty’ apply plugin: ‘eclipse-wtp’ apply plugin: ‘eclipse’ apply from: ‘dependencies.gradle’ apply from: ‘xmlHandler.gradle’ apply plugin: ‘base’


task wrapper(type: Wrapper) {

gradleVersion = ‘1.9’ }

repositories {

mavenCentral() }

dependencies {

providedCompile ‘javax.servlet:servlet-api:2.5’

compile ‘org.springframework:spring-webmvc:3.2.2.RELEASE’

runtime ‘javax.servlet:jstl:1.1.2’ }

/* Change context path (base url). otherwise defaults to name of project */ jettyRunWar.contextPath = ‘’

task cleanAndBuild(dependsOn: [‘clean’, ‘assemble’])

assemble.mustRunAfter clean

tasks.withType(Test) {

testLogging {

events ‘passed’

} }

task testSanity(type: Test, dependsOn: testClasses) {

exclude ‘**/TimeBaseTest


Shared(sub project) ======================= =======================

apply plugin: ‘java’ apply plugin: ‘eclipse’ apply from: ‘dependencies.gradle’

task wrapper(type: Wrapper) {

gradleVersion = ‘1.9’ }

settings.gradle =====================

include “:NG_Shared:NG_Shared”


Our path for the project is:

/NG_PlayerManager/ /NG_PlayerManager/NG_Shared/NG_Shared

Any ideas why ?