Bug 470390 - Ant "Additional Tasks & Support" incorrectly replaces spaces in paths with %20
Summary: Ant "Additional Tasks & Support" incorrectly replaces spaces in paths with %20
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 4.5   Edit
Hardware: PC Windows 7
: P3 normal with 10 votes (vote)
Target Milestone: 4.5.1   Edit
Assignee: Julian Enoch CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
: 471387 475093 476247 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-06-17 10:54 EDT by Innate Distress CLA
Modified: 2019-12-07 03:28 EST (History)
14 users (show)

See Also:


Attachments
new bug after eclipse dir moved (5.54 KB, image/png)
2015-08-21 09:42 EDT, Laurent Barbareau CLA
no flags Details
Ant External tools configuration build 20150924-1200 (90.78 KB, image/jpeg)
2015-11-03 08:10 EST, Vladimir Rosu CLA
no flags Details
Mars buils 20150924-1200 (79.11 KB, image/jpeg)
2015-11-03 08:11 EST, Vladimir Rosu CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Innate Distress CLA 2015-06-17 10:54:40 EDT
The following was seen with Eclipse Mars RC3. If Eclipse is placed into a path that happens to have spaces (e.g., C:\Program Files\Eclipse), Ant fails to launch because the SWT JAR entry in Additional Tasks & Support incorrectly replaces the spaces in the path with %20.

This link contains some relevant screenshots (I am not the submitter of the SO question though):

http://stackoverflow.com/questions/30529205/eclipse-external-tools-configurations-referenced-library-in-classpath-does-no
Comment 1 Martin Wegner CLA 2015-06-18 07:45:34 EDT
Same in RC4! Importance:	P3 normal w
Comment 2 Martin Wegner CLA 2015-06-18 07:49:17 EDT
(In reply to Martin Wegner from comment #1)
> Same in RC4! Importance:	P3 normal w

Why I can't edit or delete my comments...

Same in Eclipse Mars RC4! 'Importance P3 normal' is flattered! It is a blocker bug because 'C:\Program Files\eclipse' is the normal path for Windows Eclipse users...
Comment 3 Sarika Sinha CLA 2015-06-18 22:46:13 EDT
Looks related to Bug 389564

@Julian,
Can you look into this ?
Comment 4 Martin Wegner CLA 2015-06-19 02:55:17 EDT
Bug 389564 is related to 4.4.2 but 4.4.2 is not affected by this bug.
Target milestone 4.5.1?
You can't release Eclipse Mars with this bug!
Comment 5 Sarika Sinha CLA 2015-06-19 03:13:20 EDT
Fix for Bug 389564 was released in 4.5 M7, This looks like a regression from that fix.

4.5 will be out next week, can't put into that.
Comment 6 Martin Wegner CLA 2015-06-19 03:15:46 EDT
Why do you have Release Candidates...?
Comment 8 Julian Enoch CLA 2015-06-19 09:53:43 EDT
(In reply to Sarika Sinha from comment #3)
> Looks related to Bug 389564
> 
> @Julian,
> Can you look into this ?

I will do
Comment 9 Eclipse Genie CLA 2015-06-19 14:47:15 EDT
New Gerrit change created: https://git.eclipse.org/r/50559
Comment 10 Martin Wegner CLA 2015-06-22 03:12:14 EDT
And you really don't want to add this little patch to the release version? Common... :)
Comment 11 Sarika Sinha CLA 2015-06-26 04:19:15 EDT
(In reply to Eclipse Genie from comment #9)
> New Gerrit change created: https://git.eclipse.org/r/50559

Julian,
I am getting "!" at the end of swt jar name after this gerrit patch.
Comment 12 Sarika Sinha CLA 2015-06-30 00:05:07 EDT
*** Bug 471387 has been marked as a duplicate of this bug. ***
Comment 13 Julian Enoch CLA 2015-07-02 11:07:54 EDT
(In reply to Sarika Sinha from comment #11)
> I am getting "!" at the end of swt jar name after this gerrit patch.

Will look into it shortly!
Comment 14 Julian Enoch CLA 2015-07-07 13:59:35 EDT
(In reply to Sarika Sinha from comment #11)
> I am getting "!" at the end of swt jar name after this gerrit patch.

You are right. There was logic to remove "!/" but it didn't catch my single "!"

Please see patch set 2
Comment 15 Sarika Sinha CLA 2015-07-08 23:28:27 EDT
It works fine now. Will appreciate if you can add couple of testcases with "folder name" having white spaces and jars ending with "!" .
Comment 16 Julian Enoch CLA 2015-07-22 16:32:39 EDT
Bugzilla created to track the addition of a test case https://bugs.eclipse.org/bugs/show_bug.cgi?id=473315
Comment 17 Sarika Sinha CLA 2015-08-17 23:51:24 EDT
*** Bug 475093 has been marked as a duplicate of this bug. ***
Comment 18 Sarika Sinha CLA 2015-08-18 23:42:12 EDT
Julian,
I am not able to rebase the gerrit patch as the signed off email id and owner email id is different. It should be same and should be the one with which you ave configured gerrit.
Comment 19 Laurent Barbareau CLA 2015-08-21 08:35:51 EDT
Please, don't forget to implement a unit test.
Comment 20 Laurent Barbareau CLA 2015-08-21 09:42:45 EDT
Created attachment 256011 [details]
new bug after eclipse dir moved

I tried to create a symbolic link mklink /D C:\Program%20Files "C:\Program Files" but the problem changed, now I have the error that you can see in the attachement.

I also moved Eclipse into a directory without space in its name, same problem.

Even with a -clean option while launching Eclipse, no changement.

Maybe there's something else than the space problem into the name.
Comment 21 Julian Enoch CLA 2015-08-21 10:13:20 EDT
(In reply to Laurent Barbareau from comment #20)

Your problem doesn't seem to belong in this ticket. Please open a new bug.
Comment 22 Eclipse Genie CLA 2015-08-21 11:02:10 EDT
New Gerrit change created: https://git.eclipse.org/r/54313
Comment 24 Sarika Sinha CLA 2015-08-22 14:37:31 EDT
.
Comment 25 Sarika Sinha CLA 2015-08-26 07:27:32 EDT
Cherry Picked to 4.5.1 as mentioned and tracked in Bug 473315
Comment 26 Sarika Sinha CLA 2015-08-27 05:17:31 EDT
Verified using 
Eclipse SDK

Version: Mars (4.5.1)
Build id: M20150826-1000
Comment 27 Sarika Sinha CLA 2015-08-31 23:33:10 EDT
*** Bug 476247 has been marked as a duplicate of this bug. ***
Comment 28 Vladimir Rosu CLA 2015-11-03 08:09:31 EST
Bug still seems to be present as of build 20150924-1200.
Tried with Eclipse stored in path with or without spaces in path.
Comment 29 Vladimir Rosu CLA 2015-11-03 08:10:46 EST
Created attachment 257701 [details]
Ant External tools configuration build 20150924-1200
Comment 30 Vladimir Rosu CLA 2015-11-03 08:11:14 EST
Created attachment 257702 [details]
Mars buils 20150924-1200
Comment 31 Sarika Sinha CLA 2015-11-04 07:08:55 EST
Fix is available in Mars.1 build, you are facing the problem because your jdk is in "program Files" . Alternative solution is to have JDK under a non spaced directory.
Comment 32 Vladimir Rosu CLA 2015-11-04 07:21:57 EST
I am using the latest release of Eclipse from the website, the Mars.1 Release, you can see the build number in my other comment.
I know that the issue is because the path has space names.
I also know the workaround and still think this is a bug that needs to be solved.
Is it something that I am missing here?
I'm not searching for workarounds, but for a bug fix.
Comment 33 Sarika Sinha CLA 2015-11-04 07:51:54 EST
I am not able to reproduce it in Mars.1 release build.
I tried it with Eclipse SDK and Eclipse JEE build.


Can you attach a sample project with External Configuration ?
Comment 34 Vladimir Rosu CLA 2015-11-04 08:27:38 EST
After my testing I think it is another upgrade-related bug.
I was using the workspace from latest Luna release.
As it seems the .launch external tools configuration file format changed between Mars and Luna changed (I have the same file formats side by side).
While the change is not quite apparent to me, I know if I delete all the external tools configurations from Luna and recreate them again the bug doesn't manifest itself.
Another lesson that I need to learn - document bugs better.