Maven 2.x and 3.x Deploy Plugin

On Windows, Maven requires local distribution repository URL be specified as invalid file URL with Windows path.

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major 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 :
    1

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.

Issue Links

Activity

Hide
Steven Coco added a comment -

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.

Show
Steven Coco added a comment - 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.
Hide
Benjamin Bentmann added a comment -

This is actually bug in the Maven core and is fixed in the upcoming 2.1.0 release.

Show
Benjamin Bentmann added a comment - This is actually bug in the Maven core and is fixed in the upcoming 2.1.0 release.

People

Vote (3)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: