mirror of https://github.com/apache/maven.git
MVN_REPOURL env var usage for Maven binary download
This commit is contained in:
parent
9fcc635dbb
commit
98db3ffd87
|
@ -25,6 +25,13 @@ The following provides most information at an easier glance.
|
|||
- see https://github.com/takari/maven-wrapper/pull/105
|
||||
- fixes https://github.com/takari/maven-wrapper/issues/104
|
||||
- contributed by Manfred Moser http://www.simpligility.com
|
||||
- Support MVNW_REPOURL environment variable usage
|
||||
- during wrapper install and wrapper usage
|
||||
- for wrapper and maven distro download
|
||||
- in scripts and wrapper binary
|
||||
- contributed by Manfred Moser http://www.simpligility.com
|
||||
|
||||
Release performed by Manfred Moser - http://www.simpligility.com
|
||||
|
||||
## Version 0.4.2 - 2018-07-02
|
||||
|
||||
|
@ -33,6 +40,8 @@ The following provides most information at an easier glance.
|
|||
- end of line in properties file
|
||||
- parent pom upgrade
|
||||
|
||||
Release performed by Manfred Moser - http://www.simpligility.com
|
||||
|
||||
## Version 0.4.0 - 2018-02-19
|
||||
|
||||
- Allow for wrapper to work without the jar file
|
||||
|
@ -44,6 +53,8 @@ The following provides most information at an easier glance.
|
|||
- Change URLs used to official Maven repo URL
|
||||
- done as part of above changes
|
||||
|
||||
Release performed by Manfred Moser - http://www.simpligility.com
|
||||
|
||||
## Version 0.3.0 - 2017-10-25
|
||||
|
||||
- Set title on shell window in Windows
|
||||
|
|
|
@ -32,6 +32,7 @@ import java.util.Locale;
|
|||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
|
||||
/**
|
||||
* @author Hans Dockter
|
||||
*/
|
||||
|
@ -48,7 +49,15 @@ public class Installer {
|
|||
}
|
||||
|
||||
public File createDist(WrapperConfiguration configuration) throws Exception {
|
||||
URI distributionUrl = configuration.getDistribution();
|
||||
URI distributionUrl;
|
||||
String mvnwRepoUrl = System.getenv(MavenWrapperMain.MVNW_REPOURL);
|
||||
if (mvnwRepoUrl != null && !mvnwRepoUrl.isEmpty()) {
|
||||
distributionUrl = new URI(mvnwRepoUrl + "/" + MavenWrapperMain.MVN_PATH);
|
||||
Logger.info("Detected MVNW_REPOURL environment variable " + mvnwRepoUrl);
|
||||
} else {
|
||||
distributionUrl = configuration.getDistribution();
|
||||
}
|
||||
Logger.info("Downloading Maven binary from " + distributionUrl);
|
||||
boolean alwaysDownload = configuration.isAlwaysDownload();
|
||||
boolean alwaysUnpack = configuration.isAlwaysUnpack();
|
||||
|
||||
|
|
|
@ -38,6 +38,11 @@ public class MavenWrapperMain {
|
|||
public static final String MVNW_VERBOSE = "MVNW_VERBOSE";
|
||||
public static final String MVNW_USERNAME = "MVNW_USERNAME";
|
||||
public static final String MVNW_PASSWORD = "MVNW_PASSWORD";
|
||||
public static final String MVNW_REPOURL = "MVNW_REPOURL";
|
||||
|
||||
public static final String MVN_VERSION = "3.6.0";
|
||||
public static final String MVN_PATH =
|
||||
"org/apache/maven/apache-maven/" + MVN_VERSION + "/apache-maven-"+ MVN_VERSION + "-bin.zip";
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
File wrapperJar = wrapperJar();
|
||||
|
|
Loading…
Reference in New Issue