Details
Description
exec:java adds project dependencies to the classpath using the File.toURL() method. According to the documentation at http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html#toURL(), this method won't escape illegal characters in URLs, such as spaces. This means that if the dependency is within c:\Documents and Settings\.m2\repository..., it will be appended as-is to the classpath.
This does not work when using the Jetty servlet container. When deploying a web application it will try to iterate over all the URLs on the classpath and call .toURI() on them (see http://download.eclipse.org/jetty/7.0.1.v20091125/xref/org/eclipse/jetty/webapp/WebInfConfiguration.html#81). This fails because the URLs contain spaces.
I'm not sure if this is Jetty's or MEXEC's fault, but calling File.toURI().toURL() instead of just File.toURL() when adding the URL to the classpath solves the problem. The attached patch does just that.
Fixed in rev. 12385