You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tamas Cservenak (Jira)" <ji...@apache.org> on 2023/04/21 10:46:00 UTC

[jira] [Comment Edited] (MWRAPPER-109) mvnw needs some feature to support different URLs to download mvn from

    [ https://issues.apache.org/jira/browse/MWRAPPER-109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17714936#comment-17714936 ] 

Tamas Cservenak edited comment on MWRAPPER-109 at 4/21/23 10:45 AM:
--------------------------------------------------------------------

Idea: introduce something like "wrapper.prefix" that could be passed via -D or some other means to mvnw script (env variable like MAVEN_HOME is, something like MAVEN_WRAPPER_PREFIX)....

And the {{.mvn/wrapper/maven-wrapper.properties}} could look like:
{noformat}
distributionUrl=https://company.mrm/content/repositories/central/org/apache/maven/apache-maven/3.9.1/apache-maven-3.9.1-bin.zip
wrapperUrl=https://company.mrm/content/repositories/central/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
standalone.distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.1/apache-maven-3.9.1-bin.zip
standalone.wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
{noformat}
So {{MAVEN_WRAPPER_PREFIX=""}} (or lack of it) would work as today, while {{MAVEN_WRAPPER_PREFIX="standalone"}} would use alt URLs


was (Author: cstamas):
Idea: introduce something like "wrapper.prefix" that could be passed via -D or some other means to mvnw script (env variable like MAVEN_HOME is, something like MAVEN_WRAPPER_PREFIX)....

And the {{.mvn/wrapper/maven-wrapper.properties}} could look like:
{noformat}
distributionUrl=https://company.mrm/content/repositories/central/org/apache/maven/apache-maven/3.9.1/apache-maven-3.9.1-bin.zip
wrapperUrl=https://company.mrm/content/repositories/central/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
standalone.distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.1/apache-maven-3.9.1-bin.zip
stamdalone.wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
{noformat}
So {{MAVEN_WRAPPER_PREFIX=""}} (or lack of it) would work as today, while {{MAVEN_WRAPPER_PREFIX="standalone"}} would use alt URLs

> mvnw needs some feature to support different URLs to download mvn from
> ----------------------------------------------------------------------
>
>                 Key: MWRAPPER-109
>                 URL: https://issues.apache.org/jira/browse/MWRAPPER-109
>             Project: Maven Wrapper
>          Issue Type: Improvement
>          Components: Maven Wrapper Plugin
>            Reporter: Tamas Cservenak
>            Priority: Major
>
> Just like a Maven project, that may be built "standalone", but also may be redirected to some MRM (in some sealed environment, no internet just MRM accessible, using settings.xml), so basically a project can be made build-able in both but when mvnw used, this is not possible as it sticks to only one distributionUrl.
> As wrapper.properties either point to this or that. And in example above, it is either central accessible but not the MRM, or central is not accessibly only the MRM.



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