# Problem in separating eclipse runtime classpath

**URL:** https://discuss.gradle.org/t/problem-in-separating-eclipse-runtime-classpath/25912
**Category:** Buildship
**Created:** [February 21, 2018, 6:47am UTC](https://discuss.gradle.org/t/problem-in-separating-eclipse-runtime-classpath/25912 "2018-02-21T06:47:13Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![PunamPurohit](https://avatars.discourse-cdn.com/v4/letter/p/898d66/32.png) [@PunamPurohit](https://discuss.gradle.org/u/PunamPurohit)
#### Post date: [February 21, 2018, 6:47am UTC](https://discuss.gradle.org/t/problem-in-separating-eclipse-runtime-classpath/25912/1 "2018-02-21T06:47:13Z")

</div>

I am using eclipse neon,  
Buildship 2.2 and gradle 4.4.

I have multiple projects. And interdependancy betweent projects is causing problem. I want to filter or avoid runtime dependencies which feature is there in buildship 2.2. Below is description:

E.g. I have project A. Which has project B and C in its eclipse classpath.

Project A needs guava-23 with selenium 3.8.1  
where as project B and C requires Guava-19 and selenium 3.0.1.  
When i try to run testcases it does not allow me, causing conflict between guava and selenium versions.

I tried to separate out dependancies as per the [link](https://discuss.gradle.org/t/buildship-2-2-0-is-now-available/25074). I tried giving

> api project(A) but its giving me error as **Could not find method api() for arguments project[modules:A] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.**

can you please help me with this.

Thanks

---

<div class="post-metadata">

### Author: ![donat](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/donat/32/7798_2.png) [@donat](https://discuss.gradle.org/u/donat)
#### Post date: [March 5, 2018, 9:17am UTC](https://discuss.gradle.org/t/problem-in-separating-eclipse-runtime-classpath/25912/2 "2018-03-05T09:17:48Z")

</div>

I’m not sure I understand your problem. The [runtime classpath separation](https://www.eclipse.org/community/eclipse_newsletter/2018/february/buildship.php) in Buildship only kicks in when you run a Java application with Eclipse JDT (e.g., right-click on a `main` method \> Run as \> Java Application). On the other hand, your error message suggests that the problem is in your Gradle build. I believe, in your case the problem is in the build configuration. Does your problem happen when you run your build from the command line? Also, can please create an example project exhibiting the problem?
