Details
-
Type:
Bug
-
Status:
Resolved
-
Resolution: Duplicate
-
Affects Version/s: 1.0-milestone-3, 1.0-milestone-4
-
Fix Version/s: 1.0-milestone-4
Description
To reproduce:
Create a simple gradle project. A pretty much empty project with a pretty much empty buildscript will do.
Query the tooling API for the tasks on EclipseProject.
Tasks like 'cleanEclipse' and 'eclipse' will be among the returned results.
However trying to run those tasks will fail with an error.
Issue Links
- Duplicated by
-
GRADLE-1529
Eclipse model built by the tooling api for a project which does not use the eclipse plugin lists tasks which cannot be executed
-
Note: this bug seems to have existed for a while. However it has only become important to me recently.
The reason is a newly implemented STS feature:
https://issuetracker.springsource.com/browse/STS-2091
Unfortunately this feature can not be properly implemented without this bug getting fixed.
The implementation I have now works only in theory. It intends to execute eclipse tasks only if the tasks actually exist on a project. But this bug makes it seem the tasks always exist, even if they do not.
Consider a scenario where we have 20 odd projects most of which have the eclipse plugin applied and a few which do not. Such projects can not be imported reliably because of this bug. Attempting to execute eclipse tasks on all 20 projects will fail somewhere in the middle leaving tasks that should have been executed on the remaining projects unexecuted.
Ignoring the error doesn't work either, because it doesn't change the fact that half of the projects that should have gotten eclipse files generated did not.