Buildship and non Maven depenencies (fileTree)

issue-resolved
buildship

(nguillaumin) #1

Hi,

I’m trying to import a Gradle project with Buildship on Eclipse and it has the following dependencies definition:

dependencies {
    compile (
        "org.codehaus.groovy:groovy-all:${groovyVersion}",
        fileTree(dir: "${System.env.SEARCH_HOME}/lib/java/all/", include: '*.jar')
    )
}

Basically I need to import all the JAR files inside a folder located by an environment variable. While I know Maven dependencies would be better, I cannot use Maven in this case, please don’t ask me to do so :slight_smile:

While that works fine with Gradle, in Eclipse it seems this fileTree type dependency is not respected. I have to manually add all the JAR files in the project settings for the compilation to work.

Am I missing something, or is this just not supported at the moment?

Thanks,

Nico


(Stefan Oehme) #2

Hi Nico,

this should work, which version of Gradle and Buildship are you using?

Cheers,
Stefan


(nguillaumin) #3

Apologies, it works indeed. I re-imported the project to confirm and I got all my dependencies listed under “Build path” / “Project and external dependencies”.

Thanks!


(Stefan Oehme) #4

Great, thanks for verifying :slight_smile: