Generate full-source with AppFuse

In AppFuse 2.x you don’t automatically get the full source of the generated project. To generate the source, run:

mvn appfuse:full-source

On my Ubuntubox this all went well, but on my work laptop running Windows XP it failed with the fatal error:

Illegal character in path at index 18: file:/C:/Documents and Settings/myuser/.m2/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar

Turned out to be because of the spaces in the path, a not so uncommon problem for *nix stuff running under Windows.

To solve this you may either move your maven artifact repository to a path without a space, or edit the maven settings.xml so the path no longer includes a space. This is achieved by using DOS short names. To see what a files short name is, open the command prompt and run dir /X.

The settings.xml is likely located in the conf directory where you installed Apache Maven, in my case it was:

C:\Program Files\Apache Software Foundation\apache-maven-2.0.9\conf\settings.xml

I added an entry (if there is already one, edit it) for localRepository:

<localRepository>C:\DOCUME~1\myuser\.m2\repository</localRepository>

Now everything worked and I got BUILD SUCCESSFUL. Please note that the actual path is likely different on your setup. Change it as appropriate.