[GRADLE-1881] The Eclipse WTP plugin uses project name rather than eclipse project name when adding dependent modules Created: 01/Nov/11  Updated: 04/Jan/13  Resolved: 10/Mar/12

Status: Resolved
Project: Gradle
Affects Version/s: 1.0-milestone-5
Fix Version/s: 1.0-rc-1

Type: Bug
Reporter: Sune Wettersteen Assignee: Szczepan Faber
Resolution: Fixed Votes: 1

Attachments: Text File eclipse-deployname.patch    


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'

Comment by Sune Wettersteen [ 08/Nov/11 ]

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.

Comment by MikeN [ 21/Nov/11 ]

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).

Comment by Szczepan Faber [ 09/Mar/12 ]

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

Generated at Wed Jun 30 12:06:53 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.