Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: 2.0
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:Microsoft Windows XP [Version 5.1.2600]
Maven version: 2.0.4
-
Testcase included:yes
-
Number of attachments :
Description
On Windows, a local distribution repository URL must be specified as an invalid file URL with a Windows file path syntax. If it instead is given in valid file URL syntax then Maven will treat it as a Windows path name and actually create new directories matching the encoded URL's literal textual value.
Basically, the distribution management element is specified like so:
<distributionManagement> <repository> <id>local-release-repository</id> <name>Local Release Repository</name> <!-- - Notice that this is a Windows path: it uses the backslash: - and also the space is not URL encoded. - Change this to a valid file URL: - file:///C:/Local%20Repository - and Maven will then create a directory named literally: - "Local%20Repository" - at the root of the C drive,and deploy there. --> <url>file:///C:\Local Repository</url> </repository> </distributionManagement>
A test case is attached that shows the behavior. Execute the default goal on a Windows machine; and then also read the comment inside the POM to see more.
Attachments
Issue Links
| This issue duplicates: | ||||
| MNG-4087 | Percent encoded characters in file URLs are not decoded upon deployment |
|
|
|
I just noticed that this also happens on Linux. It's the same problem; and if you specify a URL with an encoded space in it, Maven will create a new directory with "%20" in the name.
And this bug's posting is a bit munged by the automatic formatting, but all the information is essentially visible; ignore the links and the bullets in that auto-generated markup.