Carsten Rohde created MWRAPPER-69:
-------------------------------------

             Summary: MVNW_REPOURL path not considered
                 Key: MWRAPPER-69
                 URL: https://issues.apache.org/jira/browse/MWRAPPER-69
             Project: Maven Wrapper
          Issue Type: Bug
          Components: Maven Wrapper Jar
    Affects Versions: 3.1.1
         Environment: Microsoft Windows 10
            Reporter: Carsten Rohde

As far as I can see, this is a new bug introduced in 3.1.1

running the plugin with said environment variable set, the plugin correctly 
writes the repository url into the maven-wrapper.properties.

using the maven wrapper however, the path part from the url is ignored and just 
the protocol://host:port part is used.

Version 3.1.1 (fails)
{code:java}
SET MVNW_REPOURL=http://myrepository.mine/base/path

[INFO] Apache Maven Wrapper 3.1.1
[INFO] Detected MVNW_REPOURL environment variable 
http://myrepository.mine/base/path
[INFO] Installing Maven distribution 
C:\Users\developer\.m2\wrapper\dists\apache-maven-3.8.1-bin\726df79b
[INFO] Downloading 
http://myrepository.mine/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip
[WARNING] Using an insecure connection to download the Maven distribution. 
Please consider using HTTPS.
Exception in thread "main" java.io.FileNotFoundException: 
http://myrepository.mine/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip
        at 
sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1890)
        at 
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
        at 
org.apache.maven.wrapper.DefaultDownloader.downloadInternal(DefaultDownloader.java:109)
        at 
org.apache.maven.wrapper.DefaultDownloader.download(DefaultDownloader.java:97)
        at org.apache.maven.wrapper.Installer.createDist(Installer.java:94)
        at 
org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:151)
        at 
org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:76)

{code}
 

Version 3.1.0 (working)
{code:java}
SET MVNW_REPOURL=http://myrepository.mine/base/path 

Found 
"C:\_dev\workspaces\git\PickApp\build\deploy\.mvn\wrapper\maven-wrapper.jar"
Apache Maven Wrapper 3.1.0
Detected MVNW_REPOURL environment variable http://myrepository.mine/base/path
Installing Maven distribution 
C:\Users\developer\.m2\wrapper\dists\apache-maven-3.8.1-bin\5rncivls3ihmmbfjma6p3gsnss
Downloading 
http://myrepository.mine/base/path/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip
WARNING Using HTTP Basic Authentication over an insecure connection to download 
the Maven distribution. Please consider using HTTPS.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.Unzipping 
C:\Users\developer\.m2\wrapper\dists\apache-maven-3.8.1-bin\5rncivls3ihmmbfjma6p3gsnss\apache-maven-3.8.1-bin.zip
 to 
C:\Users\developer\.m2\wrapper\dists\apache-maven-3.8.1-bin\5rncivls3ihmmbfjma6p3gsnss
        {code}
 

 

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to