Community
Participate
Working Groups
The Maven plugin is broken in 7.4.3 (but works in 7.4.2) due to changes in resource handling dealing with files containing spaces in paths. Trying to run the CometD demo (see instructions at http://cometd.org/documentation/building) results in this error: java.lang.IllegalArgumentException: jar:file:/C:/Documents and Settings/Simon/.m2/repository/org/cometd/javascript/cometd-javascript-dojo/2.3.0-SNAPSHOT/cometd-javascript-dojo-2.3.0-SNAPSHOT.war!/ is not an existing directory. at org.eclipse.jetty.util.resource.ResourceCollection.<init>(ResourceCollection.java:64) The war is an overlay being applied to the CometD demo war, but I suspect the issue is generic and not tied to overlays or the Jetty Maven plugin.
I'm unable to reproduce the issue in my environment. Below is the info of what versions of the components I'm using. C:\code\work\cometd 2.3.0.RC1\cometd-demo>mvn --version Apache Maven 3.0.3 (r1075438; 2011-02-28 12:31:09-0500) Maven home: C:\bin\apache-maven-3.0.3 Java version: 1.6.0_25, vendor: Sun Microsystems Inc. Java home: C:\bin\jdk1.6.0_25\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows xp", version: "5.1", arch: "x86", family: "windows"
After realizing that cometd tarball I've downloaded was using Jetty version 7.4.2.v20110526, I've changed it to use version 7.4.3.v20110701 and was able to reproduce and track down the problem. It appears to be caused by a bug in o.m.j.plugin.JettyRunMojo, that used deprecated method File.toURL() that is known to cause URL encoding issues.
Michael, Are you sure about o.m.j.p.JettyRunMojo being the cause? I agree that there seem to be uses of File.toURL() in there, but they've been there a long time - that file has not changed between jetty-7.4.2 and jetty7.4.3, so hard to see how it could be the cause of the observed different behaviour? Jan
(In reply to comment #3) Jan, you are absolutely correct, but an attempted fix for bug 350634 (that was rolled back this afternoon on master) had exposed this issue. -Michael
This issue has been fixed by rolling back the changes from bug 350634 that exposed it in the first place for Jetty v7.4.4, and the root cause of this issue has been fixed for Jetty 7.5.0. *** This bug has been marked as a duplicate of bug 351576 ***