GWT Source

When you create a Vaadin 7 project in Eclipse, the GWT source code is not included. This is rather inconvenient because this means it is much harder to develop client side gwt code. However the ivy plugin in Eclipse doesn’t allow you to manually override the sources jar. There is an old unassigned issue on this


http://dev.vaadin.com/ticket/9102

What is the best way to fix this. Any suggestions?

The relevant sources should already be in vaadin-client-compiler JAR, so when you include it you should have the sources downloaded. You should be able to set up your source path to include that JAR if not automatic.

However, GWT sources are not yet in the separate -sources JAR. This affects at least m2e (Maven Eclipse integration plug-in), which will not find them automatically. That issue should be fixed in the future.

It does not work in ivy either which the experimental Vaadin eclipse plugin uses ivy. I hope this is soon fixed,It is a pretty annoying bug. I created this ant target to fix the sources jar.


	<target name="fixsrc">
		<property name="vaadin.client.jar" location="${user.home}/.ivy2/cache/com.vaadin/vaadin-client/jars/vaadin-client-7.0.0.beta10.jar" />
		<property name="vaadin.client.sources.jar" location="${user.home}/.ivy2/cache/com.vaadin/vaadin-client/sources/vaadin-client-7.0.0.beta10-sources.jar" />
		<rename dest="${vaadin.client.sources.jar}.tmp" src="${vaadin.client.sources.jar}"/>
		<jar destfile="${vaadin.client.sources.jar}">
		    <zipfileset includes="**/*" src="${vaadin.client.sources.jar}.tmp" />
		    <zipfileset includes="**/*.java" src="${vaadin.client.jar}" />
		</jar>
	</target>