Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351443 - Maven plugin with overlays broken on Windows
Summary: Maven plugin with overlays broken on Windows
Status: CLOSED DUPLICATE of bug 351576
Alias: None
Product: Jetty
Classification: RT
Component: server (show other bugs)
Version: 7.4.3   Edit
Hardware: PC Windows All
: P3 normal (vote)
Target Milestone: 7.4.x   Edit
Assignee: Michael Gorovoy CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-07 09:26 EDT by Simone Bordet CLA
Modified: 2011-07-21 14:42 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simone Bordet CLA 2011-07-07 09:26:50 EDT
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.
Comment 1 Michael Gorovoy CLA 2011-07-07 11:43:50 EDT
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"
Comment 2 Michael Gorovoy CLA 2011-07-07 15:58:00 EDT
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.
Comment 3 Jan Bartel CLA 2011-07-07 19:14:38 EDT
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
Comment 4 Michael Gorovoy CLA 2011-07-07 20:09:24 EDT
(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
Comment 5 Michael Gorovoy CLA 2011-07-21 14:42:15 EDT
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 ***