Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329621 - Jettyhome path from run configuration surrounded by extra double quotes
Summary: Jettyhome path from run configuration surrounded by extra double quotes
Status: RESOLVED FIXED
Alias: None
Product: Jetty
Classification: RT
Component: osgi (show other bugs)
Version: 7.1.5   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 7.2.x   Edit
Assignee: Hugues Malphettes CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-06 17:21 EDT by Martin Taal CLA
Modified: 2010-11-07 22:53 EST (History)
2 users (show)

See Also:


Attachments
the jetty run configuration (28.80 KB, image/png)
2010-11-06 17:21 EDT, Martin Taal CLA
no flags Details
extra quotes visible (79.60 KB, image/png)
2010-11-06 17:22 EDT, Martin Taal CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Taal CLA 2010-11-06 17:21:32 EDT
Created attachment 182559 [details]
the jetty run configuration

Hi,
I have been trying the jetty osgi tutorial:
http://wiki.eclipse.org/Jetty/Tutorial/Jetty-OSGi_SDK

But got this error when starting jetty:

Unable to locate the jetty.home folder "/home/mtaal/mytmp/jetty_test_workspace/.metadata/.plugins/org.eclipse.pde.core/Launch Jetty in OSGi/jettyhome"

After researching and debugging the DefaultJettyAtJettyHomeHelper class I found the problem: jetty adds additional double quotes around the jetty.home path specified in the run configuration, this is visible in the console as normally a string is printed without quotes. See also the screenshots where I added an extra system.err.println, I could solve it by setting the system property directly to a correct path without double quotes.

Is this maybe already solved in a later jetty build? (will see if I can see a newer build. I have tried the above with the 7.1.6 version from mid july.

gr. Martin
Comment 1 Martin Taal CLA 2010-11-06 17:22:15 EDT
Created attachment 182560 [details]
extra quotes visible
Comment 2 Hugues Malphettes CLA 2010-11-07 11:33:14 EST
Hi Martin and thanks for filing this bug.

I must say that the OSGi tooling for jetty has gone rather dormant.
The quoting of the jetty home was made to support paths with spaces that end-up on the command-line.
However, it looks like the runtime lost that support sometimes after the wiki page was written.

A workaround consists of editing the name of the launch configuration and removing the spaces.

I'll explain on the user-dev why this tooling has gone dormant and see if we should kill it and focus our efforts on playing nicely with PDE alone or not.
Comment 3 Martin Taal CLA 2010-11-07 12:02:13 EST
Hi Hugues,
Thanks for the reply, I think I tried a path without spaces and it gave the same result but I will retest it as I can debug now.

Ok I am eager to see further description on the future of this tooling, the current approach seems fine to me afaics, but I am no expert on osgi/pde so interested to learn more on the preferred approach. 

Do you have other wiki links which I can check to see how I can run jetty in an osgi environment and within eclipse to debug and test?

gr. Martin
Comment 4 Hugues Malphettes CLA 2010-11-07 22:53:19 EST
Fixed for 7.2.1 with revision 2480

Martin, the recommended way is to download the EclipseRT Web Starter Kit:
http://download.eclipse.org/jetty/7.1.4.v20100610/dist-eclipse/

It contains a .project file to make it easy to import it into a PDE workspace. The target configuration file at the root makes it easy to setup the corresponding Target Platform.
After that you can use the launch configuration file.

As stated on bug 329634, we need to make sure that simply provisioning a Target Platform from the jetty bundles will work.