Size of vaadin jar?

I have tried searching the forum but couldn’t find anything. (Plus a n00b here).

I am evaluating whether we should be using vaadin. One of the things that we noticed was that with a simple web application not using too many sophisticated UI widgets, the size of the application is pretty huge for the Java code we write.

With a maven build (followed http://vaadin.com/wiki/-/wiki/Main/Using%20Vaadin%20with%20Maven) that I generated for the hello world application, I get a 3.8M .war file, out of which there are quite a few are Java source files (in WEB-INF/lib/vaadin-.jar). There are three widgetset html files that are half a meg each. Have I ended up downloading the jar file (I downloaded it from oss.sonatype) the wrong jar?

Thank you for any insights.

Best regards,
Kedar

You are right - vaadin.jar is quite large because of the included pre-compiled widgetsets. In theory you could maybe cut the size to half by only including the widgets you use in your application (and recompiling widgetset), but in practice that 3+M jar is rarely a real problem. Good news is that the size of Vaadin client-side is static - it does not grow with your application. (In many other (client-side) alternatives, the client side code is proportional to the size of your application UI. )

Kedar,

as Joonas previously said, the size of .WAR does not affect the client side, e.g. your app users, these 3.8 M will not go to client side when application is accessed. The only thing, the .WAR file size can relate to is the deployment time to application server - time while the .WAR is being transmitted to the app server and unpacked, however this is not a problem at all.

Thanks Dmitri and Joonas.

I think I should modify the pom.xml to make vaadin dependency a provided one and then put the jar in app-server’s classpath. That way the application size will be much reduced.

Also, what about the .java files? Are they needed in vaadin jar?

-Kedar

Java files are only for convenience during development process and for better method parameters naming and javadoc autocompletion in IDE, so feel free to remove .java files from your production vaadin.jar file if you wish.

I thought the standard way (as done by Intellij) was to download the sources of maven dependencies. OK, thanks. I will remove those .java files from the .war file used for deployment.

-Kedar