SVN problem on GWT files: Path is not a working copy directory

Hi guys,

As many of you, I use SVN to store the source code.

The WebContent/VAADIN/ folder is under version control as the other folders of my project.

Every time I recompile the GWT WidgetSet, the folder WebContent/VAADIN/widgetsets/mypackage.MyWidgetSet is recreated, including the hidden .svn subdirectory (which is simply deleted by the widgetset compiler).

When I want to commit the compiled GWT code to SVN (for other developers who don’t compile GWT stuff), subclipse (SVN client) is not happy because he cannot fine the hidden .svn folder, and throws the following error.

add -N C:\javadev\prj\JavaBlackBelt\WebRoot\VAADIN\widgetsets\blackbelt.ui.hcomponents.ComponentsApplicationWidgetset\296BEE9B980FA3BD9E5C1FF793D9C183.cache.html
    Path is not a working copy directory
svn: 'C:\javadev\prj\JavaBlackBelt\WebRoot\VAADIN\widgetsets\blackbelt.ui.hcomponents.ComponentsApplicationWidgetset' is not a working copy

I guess that many of you have the same environment. How do you deal that problem?


Your build script most likely deletes the entire widgetsets/ directory before compiling. Modify the build script only to delete everything else except the .svn-folder,

Since widgetsets can always be recreated, one solution is to add the created widgetset dir to svn-ignore. That way you don’t have to modify the build scripts (and I’m not entirely sure if the script created by the Vaadin-plugin can be modified like that).

Downside is that every developer needs to rebuild the widgetset for themselves. Another not-so-elegant solution is to make a backup of the .svn folder, compile the widgetset and then copy back the .svn folder which you previously backed up. We actually did this for a while before someone took the trouble to fix the build script :slight_smile:

Thanks guys,

My “build script” is the Eclipse .launch configuration created by the Vaadin Eclipse plugin. It’s java.exe with these arguments:

-Djava.awt.headless=true -Xss8M -Xmx500M -classpath "C:\Program Files (x86)\Java\jre1.6.0_07\lib\rt.jar;./externallib/gwt-dev-windows.jar;./externallib/gwt-user.jar;./src/main/java;.\WebRoot\WEB-INF\lib\vaadin-6.1.0-pre2.jar" -out WebRoot/VAADIN/widgetsets blackbelt.ui.hcomponents.ComponentsApplicationWidgetset

If I understand well, your suggestion would be to replace it with an ant script that launches the WidgetsetCompiler between two manipulations of the .svn folder?

Fixed which build script Kim? WidgetsetCompiler (then in which Vaadin version)?


Ah, of course, I’m way to used to use ant scripts :slight_smile: Yes, we have an ant script which we use to build the widgetset (probably because the widgetset was created a long time before the plugin was released).

Basically, what we have is an ant script which builds the widgetset to a folder x (
example of a build script
), in our case this folder is called “result/widgetset”, and then we have another target which copies the widgetset to the VAADIN/widgetsets folder. In that target we first remove everything from the widgetsets folder (excluding the .svn folder) and then copy the compiled widgetset to the VAADIN/widgetsets folder.

<target name="update-widgetset" depends="compile-widgetset">
	<!-- delete old widgetset files -->
	<delete includeemptydirs="true" failonerror="false">
		<fileset dir="${project-path}/WebContent/VAADIN/widgetsets" includes="**/*" excludes=".svn" />
	<!-- copy new widgetset files -->
	<copy todir="${project-path}/WebContent/VAADIN/widgetsets">
		<fileset dir="result/widgetset">
			<include name="**/*" />
			<exclude name="**/.*" />

Many thanks for sharing the code, Kim!
We’ll try that today

Would you have the compile-widgetset target too, Kim?
(the one I’m writing is not working).

<target name="module-classpath">
	<path id="compile.classpath">
		<!-- client-side sources -->
		<pathelement path="${project-path}/src" />
		<!-- Vaadin JAR (at least) -->
		<pathelement path="${project-path}/WebContent/WEB-INF/lib/${vaadin-jar}" />
		<!-- GWT specific JARs -->
		<pathelement path="${project-path}/${gwt-path}/gwt-user.jar" />
		<pathelement path="${project-path}/${gwt-path}/gwt-dev-${platform}.jar" />

<target name="compile-widgetset" depends="init, module-classpath">
	<mkdir dir="result/widgetset" />
	<java classname="" failonerror="yes" fork="yes" maxmemory="600m">
		<jvmarg value="-Xss8M" />
		<jvmarg value="-Djava.awt.headless=true" />
		<arg value="-war" />
		<arg value="result/widgetset" />
		<arg value="-style" />
		<arg value="${gwt-widgetset-style}" />
		<arg value="com.vaadin.FooBarWidgetSet" />
			<path refid="compile.classpath" />
	<!-- Remove temporary gwt directory -->
	<delete dir="result/widgetset/.gwt-tmp" includeemptydirs="true" />
	<echo>Remember to update your project's widgetset, see target update-widgetset.</echo>

It won’t work just by copy pasting as it depends on the init target (which in our case does a lot that doesn’t actually have anything to do with building the actual widgetset). But take the dependency away and fix all the paths and it should (probably) work.

Thank you so much Kim, your code helped to make mine work.

At first, I wanted to mimic the .launch configuration produced by the Vaadin plugin which executes

instead of the

that you directly use.

Vaadin WidgetsetCompiler is launching the When executing, GWT shows a warning that GWTCompiler is deprecated and Compiler should be used instead. Maybe a change to do in vaadin WidgetsetCompiler. But then the plugin generated .launch configuration should replace the -out parameter with the -war parameter (-out is supported by the deprecated GWTCompiler but not by Compiler).
But according to WidgetsetCompiler source code and Javadoc it’s using the deprecated GWTCompiler on purpose.