Importing composite build project failed because of WTP

Hello everybody

Currently, we have a problem when importing a composite build project that uses WTP. In our case we have an application project and a library project. The library project applies the Eclipse WTP plugin. The application project has the library project as included build. (See GitHub: https://github.com/pwoelfle/gradle-composite-build-wtp)

When importing the library project and then the application project following exception is thrown:
Caused by: org.gradle.execution.TaskSelectionException: Task 'cleanEclipseWtp' not found in root project 'project-application'. Some candidates are: 'cleanEclipse', 'cleanEclipseJdt'.

Debugging the import of the application project, I found out that org.eclipse.buildship.core.workspace.internal.RunOnImportTasksOperation.allprojects contains all projects including the included-build projects (caused by commit: https://github.com/gradle/tooling-commons/commit/8cf11ccae29280972dcb8b8f57c07a961a4a9131).
This causes the exception because the WTP tasks of the library project are executed on the application project.

I used latest Gradle Nightly 3.4-20161214000026+0000 and latest Gradle Buildship 2.0.0v20161212-0754-s

Executing tasks in included builds is not yet supported, so we should not be executing them. But that in turn means that WTP configuration for the included library project will not happen, so unfortunately including a web library is not a supported use case at the moment.

@donat can you add that to the Buildship 2.0 limitations in the documentation?

@st_oehme I’ve added it to the limitations: https://github.com/eclipse/buildship/blob/master/docs/user/Overview.md#composite-build-support