mirror of
https://hub.spigotmc.org/stash/scm/spigot/buildtools.git
synced 2025-04-13 09:31:28 +00:00
#62: Update downloaded Maven to the latest stable release
Co-authored-by: md_5 <git@md-5.net>
This commit is contained in:
parent
ae85546c00
commit
9ce73a3d05
2 changed files with 10 additions and 5 deletions
|
@ -345,18 +345,16 @@ public class Builder
|
|||
String m2Home = System.getenv( "M2_HOME" );
|
||||
if ( m2Home == null || !( maven = new File( m2Home ) ).exists() )
|
||||
{
|
||||
String mavenVersion = "apache-maven-3.6.0";
|
||||
maven = new File( mavenVersion );
|
||||
maven = new File( Constants.MAVEN_FOLDER );
|
||||
|
||||
if ( !maven.exists() )
|
||||
{
|
||||
System.out.println( "Maven does not exist, downloading. Please wait." );
|
||||
|
||||
File mvnTemp = new File( mavenVersion + "-bin.zip" );
|
||||
File mvnTemp = new File( Constants.MAVEN_FILE );
|
||||
mvnTemp.deleteOnExit();
|
||||
|
||||
// https://www.apache.org/dist/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.zip.sha512
|
||||
download( "https://static.spigotmc.org/maven/" + mvnTemp.getName(), mvnTemp, HashFormat.SHA512, "7d14ab2b713880538974aa361b987231473fbbed20e83586d542c691ace1139026f232bd46fdcce5e8887f528ab1c3fbfc1b2adec90518b6941235952d3868e9" );
|
||||
download( Constants.MAVEN_DOWNLOAD, mvnTemp, HashFormat.SHA512, Constants.MAVEN_HASH );
|
||||
unzip( mvnTemp, new File( "." ) );
|
||||
mvnTemp.delete();
|
||||
}
|
||||
|
|
|
@ -40,6 +40,13 @@ public final class Constants {
|
|||
public static final String DOWNLOAD_AZUL = "https://www.azul.com/downloads/#zulu";
|
||||
public static final String DOWNLOAD_ORACLE = "https://www.oracle.com/java/technologies/downloads/";
|
||||
|
||||
public static final String MAVEN_VERSION = "3.9.6";
|
||||
public static final String MAVEN_HASH = "0eb0432004a91ebf399314ad33e5aaffec3d3b29279f2f143b2f43ade26f4db7bd1c0f08e436e9445ac6dc4a564a2945d13072a160ae54a930e90581284d6461";
|
||||
// Derived
|
||||
public static final String MAVEN_FOLDER = "apache-maven-" + MAVEN_VERSION;
|
||||
public static final String MAVEN_FILE = MAVEN_FOLDER + "-bin.zip";
|
||||
public static final String MAVEN_DOWNLOAD = "https://dlcdn.apache.org/maven/maven-3/" + MAVEN_VERSION + "/binaries/" + MAVEN_FILE;
|
||||
|
||||
public static final String FLAG_EXPERIMENTAL = "--experimental";
|
||||
public static final String FLAG_OUTPUT_DIR = "--output-dir";
|
||||
public static final String FLAG_FINAL_NAME = "--final-name";
|
||||
|
|
Loading…
Add table
Reference in a new issue