Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 313940

Summary: PDE creates malformed vmarg in launcher ini file when using spaces and quotes
Product: [Eclipse Project] PDE Reporter: Urs Breu <login>
Component: BuildAssignee: pde-build-inbox <pde-build-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: aniefer, darin.eclipse, tjwatson
Version: 3.6   
Target Milestone: 3.7 M2   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
patch none

Description Urs Breu CLA 2010-05-21 12:35:43 EDT
Build Identifier: 20100218-1602

If a VM argument in the Launching Arguments section contains spaces (but with surrounding quotes), PDE will generate a launcher ini file with each part of the vm arg on a separate line.

Reproducible: Always

Steps to Reproduce:
1. Add vmarg to Launching Arguments section: -Dorg.eclipse.emf.common.util.URI.archiveSchemes="archive zip jar"
2. Run a product build
3. The launcher ini file looks like this:
-Dorg.eclipse.emf.common.util.URI.archiveSchemes="archive
zip
jar"
Comment 1 Andrew Niefer CLA 2010-05-25 14:21:10 EDT
Export is supposed to support quotes already.  What happens if you do
"-Dorg.eclipse.emf.common.util.URI.archiveSchemes=archive zip jar" ?

There was bug 280339 when "generate metadata" was checked, that was fixed in m2
Comment 2 Urs Breu CLA 2010-05-26 03:11:55 EDT
(In reply to comment #1)
> Export is supposed to support quotes already.  What happens if you do
> "-Dorg.eclipse.emf.common.util.URI.archiveSchemes=archive zip jar" ?
> 
> There was bug 280339 when "generate metadata" was checked, that was fixed in m2

The resulting ini file looks like this:
"-Dorg.eclipse.emf.common.util.URI.archiveSchemes=archive
zip
jar"
Comment 3 Andrew Niefer CLA 2010-05-26 10:51:38 EDT
This is mostly working for me in I20100523-0800.  Urs, I just realized you are running Galileo SR2 and this was fixed in early Helios milestones.  Please try a Helios release candidate, RC1 is available at http://www.eclipse.org/downloads/, look for the "Development Builds" tab.  (What threw me off is the Eclipse SDK 3.5.2 is M20100211-1343 but the packages are 20100218-1602)


When I say "mostly working" I meant both of 
-Dorg.eclipse.emf.common.util.URI.archiveSchemes="archive zip jar"  and
"-Dorg.eclipse.emf.common.util.URI.archiveSchemes=archive zip jar"
are working when you select "Generate metadata repository" on export.

However, if you don't generate metadata, then -Dorg.eclipse.emf.common.util.URI.archiveSchemes="archive zip jar"
doesn't work, but the quotes around the full thing does work.  I will keep this bug in build to fix this last case.
Comment 4 Urs Breu CLA 2010-05-27 02:51:54 EDT
(In reply to comment #3)
> This is mostly working for me in I20100523-0800.  Urs, I just realized you are
> running Galileo SR2 and this was fixed in early Helios milestones.  Please try
> a Helios release candidate, RC1 is available at
> http://www.eclipse.org/downloads/, look for the "Development Builds" tab. 
> (What threw me off is the Eclipse SDK 3.5.2 is M20100211-1343 but the packages
> are 20100218-1602)
> 
> 
> When I say "mostly working" I meant both of 
> -Dorg.eclipse.emf.common.util.URI.archiveSchemes="archive zip jar"  and
> "-Dorg.eclipse.emf.common.util.URI.archiveSchemes=archive zip jar"
> are working when you select "Generate metadata repository" on export.
> 
> However, if you don't generate metadata, then
> -Dorg.eclipse.emf.common.util.URI.archiveSchemes="archive zip jar"
> doesn't work, but the quotes around the full thing does work.  I will keep this
> bug in build to fix this last case.

Thanks for your help!
I can confirm your statements using Helios RC1.
Comment 5 Andrew Niefer CLA 2010-08-25 17:47:02 EDT
Created attachment 177479 [details]
patch
Comment 6 Andrew Niefer CLA 2010-08-25 17:47:13 EDT
fixed