Workaround for buildship composite build and eclipse-wtp

Viewed 440

I have a root project(web-app) with 2 included builds(core and models) in my eclipse workspace and I want to start the web-app in eclipse-tomcat.

settings.gradle of web-app:

rootProject.name = 'web-app'

includeBuild  '../core'
includeBuild  '../models'

The documentation says that gradle composite builds don't work with eclipse-wtp: https://blog.gradle.org/announcing-buildship-2.0

Applying the eclipse-wtp plugin to the included builds(core and models) helps a lot. Without this the core and models.jar won't be included in the wtpwebapps/web-app/WEB-INF/lib folder.

The models project is a JPA project and must be enhanced. This is done with a gradle task in the models project and works if the models project is build "standalone" or with the composite build of the root project(war).

If I look at the wtpwebapps/web-app/WEB-INF/lib folder I can see that the models project is not enhanced, it looks like the models.jar is just a compiled version of the models project from the eclipse workspace.

The correct jar file with enhancement would be in models/build/libs. I am looking for a workaround to get this fixed, for example configure the eclipse-wtp task of models project somehow like

eclipse{
    wtp{
        component {
           resource sourcePath /build/libs deployPath /WEB-INF/lib
        }
    }
}

I am not so familiar with the eclipse wtp configuration so maybe someone can help to create a workaround for the buildship composite build limitation.

0 Answers
Related