hal / elemento

Builder API and other goodies for Elemental2

Home Page:https://hal-console.gitbook.io/elemento/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gwt-user.jar shouldn't be included in war

anbuck opened this issue · comments

My understanding is that gwt-user.jar doesn't need to be included in the war file, but it is getting included in my project's war. I believe this is because elemento lists gwt-user.jar as a compile scope dependency rather than a provided scope dependency, but I'm not confident that changing the scope to provided is the correct solution. Would making this change cause other problems?

If you use this project layout (https://github.com/tbroyer/gwt-maven-archetypes) your client side should be compiled out as a war that only contains the GWT compiler output (html, js, css and public resources) and you add this client-side gwt-app war as a war overlay of the server-side so no dependencies should be added to your server-side war.

The tbroyer gwt-maven-plugin documentation explains how to correctly organize a GWT project https://tbroyer.github.io/gwt-maven-plugin/.

Ok, thanks! I will look into it, although I'm using gradle instead of maven, so I'll have to figure out if I can do something similar with gradle. Just so I understand, since the client jar dependencies won't be needed in the classpath at runtime, is there any downside to declaring them as scope provided? If I submitted a pull request with that change, would it be rejected?

TBH I didn't test whether scope provided works. But since it doesn't follow the best practice, a PR doesn't make much sense to me 😉