# Buildship doesnt import correctly

**URL:** <https://discuss.gradle.org/t/buildship-doesnt-import-correctly/19918>\
**Category:** Buildship\
**Created:** [October 7, 2016, 7:03pm UTC](https://discuss.gradle.org/t/buildship-doesnt-import-correctly/19918 "2016-10-07T19:03:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![alissonssz](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@alissonssz](https://discuss.gradle.org/u/alissonssz)\
**Post date:** [October 7, 2016, 7:03pm UTC](https://discuss.gradle.org/t/buildship-doesnt-import-correctly/19918/1 "2016-10-07T19:03:12Z")

</div>

Hi guys,

I’m trying to build this project: [https://github.com/mdpnp/mdpnp](https://github.com/mdpnp/mdpnp) in eclipse IDE.

The gradlew script works fine, the project compiles and runs through the command line “gradlew :interop-lab:demo-apps:run”

But when I import the project to eclipse using the buildship plugin many errors are shown. Erros like java.lang.ClassNotFoundException and java.lang.NoClassDefFoundError however the classes are there, in the project.

Any help is very appreciated!

---

<div class="post-metadata">

**Author:** ![st\_oehme](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/st_oehme/32/5249_2.png) [@st\_oehme](https://discuss.gradle.org/u/st_oehme)\
**Post date:** [October 7, 2016, 7:41pm UTC](https://discuss.gradle.org/t/buildship-doesnt-import-correctly/19918/2 "2016-10-07T19:41:22Z")

</div>

Hi Alisson,

I guess you mean ClassNotFoundExceptions at runtime, not when importing, right? Since you are using Gradle 2.3, you are hitting a known bug in Buildship 1.0.20, which will be fixed in 1.0.21 next week.

However, you can just upgrade to a newer Gradle version (at least 2.5) and it will work too.

Cheers,  
Stefan

---

<div class="post-metadata">

**Author:** ![alissonssz](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@alissonssz](https://discuss.gradle.org/u/alissonssz)\
**Post date:** [October 9, 2016, 6:27pm UTC](https://discuss.gradle.org/t/buildship-doesnt-import-correctly/19918/3 "2016-10-09T18:27:47Z")

</div>

Hi Stefan,

You are right! at runtime, I did not express myself very well previously. I got it using the version 2.9, because 3.0 or higher doesn’t support custom build and that project use it.

Thank you Stefan!

---

<div class="post-metadata">

**Author:** ![st\_oehme](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/st_oehme/32/5249_2.png) [@st\_oehme](https://discuss.gradle.org/u/st_oehme)\
**Post date:** [October 10, 2016, 5:34pm UTC](https://discuss.gradle.org/t/buildship-doesnt-import-correctly/19918/4 "2016-10-10T17:34:00Z")

</div>

You should not be using a custom build task, that’s pretty much always a design error. Just add dependencies to the existing one instead.

```gradle
task zipMyLibrary
build.dependsOn zipMyLibrary

```

Updating to 3.1 should be trivial and will give you a big peformance boost and all new features.

---

<div class="post-metadata">

**Author:** ![alissonssz](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@alissonssz](https://discuss.gradle.org/u/alissonssz)\
**Post date:** [October 10, 2016, 7:20pm UTC](https://discuss.gradle.org/t/buildship-doesnt-import-correctly/19918/5 "2016-10-10T19:20:59Z")

</div>

Nice! I’ll try it.

Thank you for your attention!
