Gradle

The Eclipse WTP plugin uses project name rather than eclipse project name when adding dependent modules

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0-milestone-5
  • Fix Version/s: 1.0-rc-1
  • Component/s: IDE integration
  • Labels:
    None

Description

The Eclipse WTP plugin uses gradle project name rather than eclipse project name when adding dependent modules. This seems to happen in the WtpComponentFactory here.

E.g. when a WTP project depends on another project which has something like the following configuration, the dependency will not be correct. The eclipse-wtp plugin will create a dependency to a project with the name of the gradle project, rather than that of the eclipse project. This is actually quite serious as the project.name documentation specifies that the name of the project may not be unique within a project hierarchy, while eclipse project names are required to be unique. As a consequence of this it will be necessary for larger projects to explicitly configure the name of the eclipse project to be something else than that of the gradle project.

eclipse {
  project {
    name = 'some name which differs from project.name'
  }
}

Activity

Hide
Sune Wettersteen added a comment -

This seems to be handled correctly when creating normal project dependencies as seen here. I would assume the same check would fix this problem as well.

Show
Sune Wettersteen added a comment - This seems to be handled correctly when creating normal project dependencies as seen here. I would assume the same check would fix this problem as well.
Hide
MikeN added a comment -

The deploy-name of utility modules is wrong too. It should be the Eclipse project name instead of the project name.

Attached patch seems to fix the problem here (YMMV).

Show
MikeN added a comment - The deploy-name of utility modules is wrong too. It should be the Eclipse project name instead of the project name. Attached patch seems to fix the problem here (YMMV).
Hide
Szczepan Faber added a comment -

Thanks guys for the patch and for reporting. Fixing...

Show
Szczepan Faber added a comment - Thanks guys for the patch and for reporting. Fixing...

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: