You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Aasim Malladi (Jira)" <ji...@apache.org> on 2019/10/16 00:18:00 UTC

[jira] [Created] (MDEPLOY-261) Inconsistent encoding behavior for repository urls with spaces

Aasim Malladi created MDEPLOY-261:
-------------------------------------

             Summary: Inconsistent encoding behavior for repository urls with spaces
                 Key: MDEPLOY-261
                 URL: https://issues.apache.org/jira/browse/MDEPLOY-261
             Project: Maven Deploy Plugin
          Issue Type: Bug
          Components: deploy:deploy
    Affects Versions: 3.0.0-M1
         Environment: OS: Windows 10
mvn -v 

Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T11:41:47-07:00)
Maven home: C:\<redacted>
Java version: 12.0.1, vendor: Oracle Corporation, runtime: C:\<redacted>
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

mvn deploy version:  3.0.0-M1

other plugins through effective pom:

<plugins>
        <plugin>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>1.3</version>
        </plugin>
        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>2.2-beta-5</version>
        </plugin>
        <plugin>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.8</version>
        </plugin>
        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.3</version>
        </plugin>
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.7.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>
      </plugins>

            Reporter: Aasim Malladi


Hi - I have a maven project that deploys its artifacts to a remote repository. I have configured the remote repository both in the repositories and distributionRepositories as follows: 
{code:java}
<repositories>   
 <repository>   
  <id>id1</id>  
  <url>https://hostname/test/spacyurl%20Spacy/maven/v1</url>   
  <releases> 
    <enabled>true</enabled>
   </releases>   
  <snapshots>     
   <enabled>true</enabled>
   </snapshots> 
 </repository>   
</repositories>   
<distributionManagement>   
 <repository>   
  <id>id1</id>  
  <url>https://hostname/test/spacyurl%20Spacy/maven/v1</url>   
  <releases> 
    <enabled>true</enabled>
  </releases>   
  <snapshots>     
   <enabled>true</enabled>
  </snapshots> 
 </repository>   
</distributionManagement>



{code}
As you can see my URL has spaces in it.

When I run 'mvn install', it correctly uses the encoded URL with spaces and downloads the dependencies. However, when I try to deploy this package to the remote repo, it fails with a 404 not found error. On further investigation, it looks like the URL is being encoded twice before the PUT request is sent. 

If I remove the encoding, ie., put the URL with spaces, the deployment works, however, the install fails.

Let me know if you need more information about this.

Aasim
 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)