[GRADLE-1231] making eclipse Wtp working more smoothly with multi projects Created: 23/Nov/10  Updated: 04/Jan/13  Resolved: 15/Mar/12

Status: Resolved
Project: Gradle
Affects Version/s: 0.9
Fix Version/s: None

Type: Improvement
Reporter: Evert Tigchelaar Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 4

Attachments: File Copy of build.gradle    


If you have multi project and you define a project dependency in your web project on another project and run the eclipseWtp task then the project dependency is added like this:

<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/platonos-lightning-core/platonos-lightning-core">

If you try to deploy the web project then no jars are copied from the dependency project.
I was able to make a workaround by modifying the generated org.eclipse.wst.common.component file.
I throw away the dependent-module nodes rebuild it. I collect all dependencies, most are coming from the gradle cache,
but some are from the 'build/libs' directory in the projects. In this way you don't have to upload them first.
If you change something in a project then you can simply build the project and refresh the web project in Eclipse
and wtp will deploy the changed jar(s).

I guess that there may be situations that the excisting eclipseWtp task works fine, maybe for enterprise applications instead of a simple war application. So the current behavior could be the default behavior and other could be configured.

Comment by Szczepan Faber [ 15/Mar/12 ]

>If you try to deploy the web project then no jars are copied from the dependency project.

This problem has been fixed some time ago. That is, if you have a multi-module build and web modules depending on some java projects, the jars from java projects are deployed correctly. This works because the dependency project has all its jars listed in the deployment assembly (the wtp component file). One other thing that enables this solution is that all participating projects must have 'eclipse-wtp' plugin installed.

I'm closing this issue, feel free to comment and reopen if necessary!

Comment by Szczepan Faber [ 15/Mar/12 ]

Cannot reproduce with recent Gradle versions.

Generated at Wed Jun 30 11:50:19 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.