Buildship doesnt import correctly


(Alisson Santos) #1

Hi guys,

I’m trying to build this project: 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!


(Stefan Oehme) #2

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


(Alisson Santos) #3

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!


(Stefan Oehme) #4

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.

task zipMyLibrary
build.dependsOn zipMyLibrary

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


(Alisson Santos) #5

Nice! I’ll try it.

Thank you for your attention!