# .classpath generation with the Gradle Eclipse plugin?

**URL:** <https://discuss.gradle.org/t/classpath-generation-with-the-gradle-eclipse-plugin/1384>\
**Category:** Old Forum Archive\
**Created:** [August 9, 2012, 9:20am UTC](https://discuss.gradle.org/t/classpath-generation-with-the-gradle-eclipse-plugin/1384 "2012-08-09T09:20:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris\_molozian](https://avatars.discourse-cdn.com/v4/letter/c/b77776/32.png) [@chris\_molozian](https://discuss.gradle.org/u/chris_molozian)\
**Post date:** [August 9, 2012, 9:20am UTC](https://discuss.gradle.org/t/classpath-generation-with-the-gradle-eclipse-plugin/1384/1 "2012-08-09T09:20:00Z")

</div>

I have a multi project build environment setup, in my root gradle build script I’ve created a ‘provided’ configuation because Gradle still does not supply a compile-only dependency configuration.

When I attempt to generate an Eclipse project and .classpath file using the Gradle Eclipse plugin the provided dependencies are not added to the .classpath.

The build scripts look as follows:

```gradle
// root build.gradle
subprojects {
    apply plugin: 'eclipse'
      configurations {
        provided
    }
      plugins.withType(JavaPlugin) {
        repositories {
            mavenCentral()
        }
          sourceSets {
            main { compileClasspath += configurations.provided }
        }
          dependencies {
            provided group: 'org.projectlombok', name: 'lombok', version: '0.11.2'
        }
          eclipse {
            classpath { plusConfigurations += configurations.provided }
        }
    }
}

```

```gradle
// settings.gradle
include 'App'
include 'Api'
include 'Service'

```

```gradle
// each child project
apply plugin: 'java'

```

I’m using Gradle 1.1 to test with at the moment.

---

<div class="post-metadata">

**Author:** ![Mike\_Hoff](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/mike_hoff/32/852_2.png) [@Mike\_Hoff](https://discuss.gradle.org/u/Mike_Hoff)\
**Post date:** [August 9, 2012, 10:06am UTC](https://discuss.gradle.org/t/classpath-generation-with-the-gradle-eclipse-plugin/1384/2 "2012-08-09T10:06:00Z")

</div>

Have you tried compile instead of provided?

e.g. :

dependencies {

compile group: ‘org.projectlombok’, name: ‘lombok’, version: ‘0.11.2’

}

eclipse {

classpath { plusConfigurations += configurations.compile }

}

And in the settings file you should list your sub projects folder names, not only the included plugins And don’f forget to refresh the workspace in Eclipse

---

<div class="post-metadata">

**Author:** ![chris\_molozian](https://avatars.discourse-cdn.com/v4/letter/c/b77776/32.png) [@chris\_molozian](https://discuss.gradle.org/u/chris_molozian)\
**Post date:** [August 9, 2012, 10:11am UTC](https://discuss.gradle.org/t/classpath-generation-with-the-gradle-eclipse-plugin/1384/3 "2012-08-09T10:11:00Z")

</div>

Hi Mike,

Thanks for the reply, the reason I’m using a provided configuration is because Project Lombok is a compile-time only dependency. It’s a Java project that hooks in to the internals of the Java compiler and rewrites the AST nodes to generate getters, setters, logging etc. It’s worth checking it out here: [http://projectlombok.org/](http://projectlombok.org/)

I do not want the project to become a compile configuration dependency. Everything works perfectly when I run the build via Gradle.

The issue I’m having is that the eclipse classpath closure in my root gradle build script appears to be ignored by the Gradle Eclipse plugin when generating .classpath for child projects.
