1

Eclipse buildship doesn't like this configuration line:

eclipse {
  pathVariables 'M2_REPO': new File(repositories.MavenLocal.url)
}

which causes the gradle-eclipse plugin to produce better .classpath files (using the M2_REPO variable, rather than absolute path names) - but Eclipse Buildship then fails adding the maven dependencies to the classpath at all. :-(

Is there any way to detect buildship? Some environment variable or property?

I would like to work-around buildship simply by doing:

eclipse {
  if (!buildship)
    pathVariables 'M2_REPO': new File(repositories.MavenLocal.url)
}

If you know any good way of having buildship import preferences such as code templates and code formatting, I'd also be happy to know.

Tunaki
  • 132,869
  • 46
  • 340
  • 423
Erich Schubert
  • 8,575
  • 2
  • 26
  • 42

0 Answers0