buildship
buildship copied to clipboard
Composite build does not generate facets for included projects (Eclipse JEE 20191212-1212, Gradle 6.0.1)
It seams that Buildship does not support this functionality: https://docs.gradle.org/current/userguide/composite_builds.html#separate_composite I've prepared a test project that can be used to reproduce this problem: https://github.com/maciejmiklas/eclipse_buildship
We have a simple Wicket web application in eclipse_buildship/my_webapp
. It references a lib from eclipse_buildship/my_lib
.
Both project can be developed separately, so the my_webapp
references the lib over compile ('org.test:my_lib:1.0.0-SNAPSHOT')
Now I would like to develop the web application and the lib in one workspace without modifying existing build files. In order to archive it I've created composite project in eclipse_buildship\eclipse_buildship
that includes both projects:
rootProject.name = 'eclipse_buildship'
includeBuild '../my_lib'
includeBuild '../my_webapp'
The build itself is correct. I can create war on command line (there is war task for it). Importing into IntellJ works also as expected, only eclipse does not work.
Importing into eclipse works fine, but it does not generate facets for imported projects. Therefore war cannot be deployed into tomcat.
I could execute WTP task from command line and it would enable web nature for my_webapp
, but such deployment does not contain my_lib
from the workspace.
I understand, that it's possible to migrate my_webapp
into composite build, but this is very inconvenient and would require modification of build files. This might work for hello-world-projects, but in real live we have multiple projects of different nature in one workspace, so it's had to decide which project should be composite and which one not. Not mentioning the fact, that we would have to determine what includes such composite project should have.
In this case one composite project pro workspace that includes all projects is a way to go.
I've tracked down the root cause. It seems that Buildship ignores included builds when calling the eclipseWtp
task.
Buildship has only basic support for WTP projects. In any case, I'll try to provide a fix in the near future.
FYI, I know that the workspace composite feature is being developed by an external contributor, it may be helpful for you.
Same problem here. We would like to separate our large multiproject build into separate standalone component-builds and link them together by included-builds. This bug finally stopped us from doing the expected reorganisation as Eclipse is the main IDE used and run/debug out of Eclipse is essential in the development process in our team.
Can't anyone find a solution to this problem? It's a shame to have to change IDE just because of this bug.