Building Vaadin 6.3.4 with Windows 7

Here is what I had to do to get a successful build under Windows 7.

I checked out Vaadin 6.3.4 from svn and just pushed Build to see what happens.

Here are the issues I encountered.

  1. Error: "Error – wrong Java version. “Java version is 1.6, but Vaadin must be compiled with genuine Java 1.5 compiler. Use -Dignoreversion=1 ". I am using Java 6 so I had to go into Eclipse-Window-Preferences-Ant-Runtime-Properties & adding property ignoreversion=1.

  2. Javadoc failed: java.io.IOException: Cannot run program “javadoc.exe”. This an Ant/Eclipse path problem. Initially my Eclipse was pointing to a jre. I switched Eclipse-Window-Preferences-Java-Installed JREs to point at jdk1.6.0_14. This is what it should be, but it did not help. I couldn’t figure where Ant under Eclipse looks to get its Javadoc path. To me it should use the Eclipse Properties so Projects can be configured as needed. I fixed it by adding jdk/bin to the Windows User path. Perhaps System path would have been better.

  3. The next error was “C:\Users\Robin\Robins_root\Software\Eclipse_workspace_2\Vaadin_6.3.4\build\build.xml:378: Execute failed: java.io.IOException: Cannot run program “chmod” (in directory “C:\Users\Robin\Robins_root\Software\Eclipse_workspace_2\Vaadin_6.3.4”): CreateProcess error=2, The system cannot find the file specified”. It seems Vaadin build is usually done on Linux. I commented out the lines:

376
377
378
379
380
381

  1. I got the error “C:\Users\Robin\Robins_root\Software\Eclipse_workspace_2\Vaadin_6.3.4\build\build.xml:907: The following error occurred while executing this line:
    java.io.FileNotFoundException: C:\Users\Robin\Robins_root\Software\Eclipse_workspace_2\Vaadin_6.3.4\build\checkout\docs\build\build.xml (The system cannot find the file specified)”.

The file was there, but in fishing around, Eclipse said
"Eclipse reports “Resource is out of sync with the file system …Press F5”.
Now I know I did an F5 just before the build, so I am not sure why I needed another one. So push F5 and rebuild.

Voila!

BUILD SUCCESSFUL (4)
Total time: 15 minutes 25 seconds

Now to see if I can use it!

It seems there is really just one thing to fix in Vaadin build to support Windows: to somehow recognise Windows presence and not call chmod.

Making a full build is very rarely necessary except when preparing a Vaadin release for publication.
You are probably only interested in a few targets, primarily
package-jar
(compiles all widgetsets and prepares a JAR),
package-jar-quick
(only builds the DefaultWidgetSet) and
widgetset-*
that only compile specific widgetsets.

These should work correctly on Windows.

Vaadin is designed to be compatible with Java 5 and later. While you could give target version 1.5 for the Java 6 compiler, there would still be libraries that are only available in Java 6, and there are some subtle differences between the Java 5 compiler and the output of the Java 6 compiler with target 1.5.

You can safely set the ignoreversion property in a development environment.