Maven size of WAR file


until now I did use netbeans with some custom stuff to build the vaadin 6.x applications.
Now for the first vaadin 7 application I grabbed the 7.1.0beta1 version and used the maven build process for vaadin.

For a simple vaadin 7 app i receive a war with 35MB in size, not realy that usefull to deploy to remote servers…

The WEB-INF folder has 11MB in size, this is OK when looking at the included jar libraries.
The VAADIN folder has 126MB in size, which is too much
Inside I see

  • gwt-unitCache with 92MB included in the WAR file, no need to include this one
  • widgetsets\WEB-INF\deploy with 26MB, which also is not needed

After removing them from the WAR file, the WAR size is reduced down to 12MB instead of the original 35MB…

Do I have a problem with my maven setup, or is the maven build process not intended to build productions ready war files ?

I don’t know anything about maven, but I do know that I’ve just been battling with those very same directories in my Ant build.

They certainly can and should be deleted from the deployable web application!

If these end up in the WAR in a project created with the latest application archetype, please
create a ticket
about this.

Just tested it with a new 7.1.2 application, and the final WAR size is 34MB.
When removing the folders the war shrinks to 12MB

I’m very new to Vaadin, but today with my first tries of making example webservice working - I noticed the same strange thing as author of this topic - unnecessary files in war.
I’m using newest Vaadin 7.1.6 with Intellij Maven project - I’m just following the tutorial from Vaadin Book: I created simple app from vaadin-archetype-application, and compiled war is about 33MB!
I see this ticket mentioned above is a bit of dead for some time.

So how can I fix this problem, or how can I escalate the problem for the Vaadin team?

See also
ticket #12653
add a maven-war-plugin configuration
that excludes those directories.

I agree that this should be in the archetype, should look at this when next making other updates to it.

I just did fresh project with maven, it gives 74M war file.

$ mvn archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-application-multimodule -DarchetypeVersion=7.6.8

$ mvn -Pproduction package