Run Application from Eclipse

My Projects Layout Like Below.

Project: 1

src
lib
conf
bin

Project: 2

src
lib
conf
bin
tomcat

Project: 3

src
lib
conf
bin
WebContent

Project: 4

src
lib
conf
bin
WebContent

Build Logic:

Project 4: dependsOn: project 1,project 2, project 3
Project 3: dependsOn: project 1,project 2
Project 2: dependsOn: project 1

task runApp(type: JavaExec, dependsOn: classes) {
main = "com.test.app.Testing"
classpath = sourceSets.main.runtimeClasspath
classpath += sourceSets.main.compileClasspath
}

The mentioned class available in Project 2 (main = “com.test.app.Testing”)
If I’m running this task (runApp) from Project 2 its working fine.

Problem Area:

If I’m running this task (runApp) from Project 3 or 4, its not working.

The relevant conf,tomcat reference not visible in Project 3 & 4

Any proper way is there to run the application from Eclipse.?