public static void main(String args[]) {
    System.out.println("- Downloader started");
    File baseDirectory = new File(args[0]);
    System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());

    // If the maven-wrapper.properties exists, read it and check if it contains a custom
    // wrapperUrl parameter.
    File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
    String url = DEFAULT_DOWNLOAD_URL;
    if (mavenWrapperPropertyFile.exists()) {
      FileInputStream mavenWrapperPropertyFileInputStream = null;
      try {
        mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
        Properties mavenWrapperProperties = new Properties();
        mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
        url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
      } catch (IOException e) {
        System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
      } finally {
        try {
          if (mavenWrapperPropertyFileInputStream != null) {
            mavenWrapperPropertyFileInputStream.close();
          }
        } catch (IOException e) {
          // Ignore ...
        }
      }
    }
    System.out.println("- Downloading from: " + url);

    File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
    if (!outputFile.getParentFile().exists()) {
      if (!outputFile.getParentFile().mkdirs()) {
        System.out.println(
          "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
      }
    }
    System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
    try {
      downloadFileFromURL(url, outputFile);
      System.out.println("Done");
      System.exit(0);
    } catch (Throwable e) {
      System.out.println("- Error downloading");
      e.printStackTrace();
      System.exit(1);
    }
  }
Name of the property which should be used to override the default download url for the wrapper.
.mvn/wrapper/MavenWrapperDownloader.java