Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Vaadin Compiler [Eclipse] always silently and fatally fails
Hi Vaadin Forum,
I was about to raise a ticket in Trac on this, but I thought I'd put it out there on the forum first..
The issue is this:
Windows OS has a hard-coded limit of 8192 chars on the size of any command line run anywhere in the OS.
In Eclipse, and using the latest (or not the latest - I'm currently using 7.4.3) Vaadin plugin, when 'Compile Widgetset' is invoked (this can occur for Compile Theme as well), the command fails silently - i.e. it runs then immediately exits with no console output, nothing.
[Note: in earlier version of the Vaadin plugin, the command line is outputed then it fails]
The reason it fails is that the plugin builds a classpath of the *absolute* paths of every jar file in the Eclipse projecct classpath - for Vaadin this is mostly the WEB-INF lib jars, but others as well.
Because, in my Eclipse environment, we use Git, and paths that are not straight off the root folder (they're not terribly deep, but not shallow either), This makes absolute paths pretty long. We also have a lot of dependencies and add-ons.
The resulting command-line is WAY longer than Windows can handle and so fails immediately.
It's easy to test this by pasting such a gwtcompiler command line into a script and trying to run it in PS or command prompt.
An immediate error is thrown by Windows
It may be possible for the Vaadin Plugin to use the Eclipse GNU ARM Build Tools to get 'round this (see this article: (http://mcuoneclipse.com/2015/03/29/solving-the-8192-character-command-line-limit-on-windows/)
I couldn't immedately see where the Vaadin compiler gets launched to try this out - maybe someone on the forum knows?
In any case, there are 2 possible solutions:
- Update the Vaadin plugin so that it uses the GNU ARM tools shell to execute the gwtcompiler rather than Windows command line. (and make the tools a pre-req lib to the plugin)
- Change the Vaadin plugin to use *relative* classpath entries, which will greatly shorten the classpath
If someone in Vaadin would like me to create Trac ticket for this, let me know, as I should think many people are 'suffering in silence' about compiling widgetsets.
indeed the Trac is the best place to report this problem. Please go ahead and do file a bug there.