Eclipse gradle and maven tooling - local resolutio

2019-03-31 20:24发布

问题:

I want to gradually migrate a multi-module maven build to a multi-module gradle build.

I'm currently using m2e maven tooling in eclipse and one feature I like is that if projectA depends on projectB and both projects are in my eclipse workspace, m2e is smart enough to use the local .class files for projectB instead of using the .jar file from my maven repository. Let's call this feature "local resolution".

So, can the eclipse gradle tooling and m2e play nicely together?

  1. If a gradle project depends on a maven project, can the maven project be locally resolved
  2. If a maven project depends on a gradle project, can the gradle project be locally resolved
  3. If a gradle project depends on a gradle project, can the dependent gradle project be locally resolved?

回答1:

Resolving local gradle projects is blocked until GRADLE-2750 is resolved. So the current state is this:

  1. Local resolution works for gradle project depending on maven project (fixed in version 3.1.0.M1)
  2. Local resolution fails for maven project depending on gradle project
  3. Local resolution fails for gradle project depending on gradle project

Related STS issues

  • STS-2834
  • STS-2405
  • STS-2836

Update

GRADLE-2750 has been fixed and will be available in the next gradle release, Gradle 1.12.



回答2:

The upcoming composite build support feature in the buildship plugin sounds very promising.

From what I can see this will solve question 3.