Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » Special character in artifact repository URI(Artifact download fails when URI of artifact repository contains # character)
Special character in artifact repository URI [message #1009670] Fri, 15 February 2013 13:52 Go to next message
Susanne Mayer is currently offline Susanne MayerFriend
Messages: 1
Registered: February 2013
Junior Member
We have developed a new Installer application using the p2 framework, and came across the following quite special problem:

If for the provisioning a local p2 repository is used (metadata and artifacts repository in the same location), and the local path to that repository contains the # character (e.g. "D:\test\repository_#1", which is a valid path on Windows), the provisioning fails inside the IEngine.perform(provisioningPlan, monitor) method. From the status message returned it looks like the path to the artifacts repository is cut at the position of the # character, i.e. p2 tries to copy from "D:\test\repository_".

The # character seems to be the only ASCII character causing this kind of issue which is allowed in a Windows file or folder name.
Accesses to the Metadata Repository in the same folder seem to work fine.

Is there any possibility to circumwent that issue, e.g. by replacing the # character in the URI with some escape sequence?

We are currently developing on Eclipse 3.8.0, based on Java 1.7.0_03.

Best regards,
Re: Special character in artifact repository URI [message #1014217 is a reply to message #1009670] Mon, 25 February 2013 11:42 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 848
Registered: January 2012
Senior Member

Octothorps are special in URIs: you need to escape this using %23 (I believe) -- that's hex for the ASCII character code.


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Re: Special character in artifact repository URI [message #1075358 is a reply to message #1014217] Mon, 29 July 2013 09:41 Go to previous message
sudhan p is currently offline sudhan pFriend
Messages: 2
Registered: July 2013
Junior Member
Also true when other 'forbidden' characters are used. One that I know of is the @ character. Windows allows it in file paths but this fails when p2 interprets the url to terminate at @. Just url encode the file path and you should be fine. in java you could simply do this via the URLEncoder class.
Uma Sudhan
Previous Topic:No repository found at xyz (ProvisionException)
Next Topic:Update site issue
Goto Forum:

Current Time: Sun Sep 22 09:48:44 GMT 2019

Powered by FUDForum. Page generated in 0.02035 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top