Commits
Nothixal authored and md_5 committed 9ce73a3d056
338 338 | |
339 339 | File buildData = new File( "BuildData" ); |
340 340 | if ( !buildData.exists() || !containsGit( buildData ) ) |
341 341 | { |
342 342 | clone( "https://hub.spigotmc.org/stash/scm/spigot/builddata.git", buildData ); |
343 343 | } |
344 344 | |
345 345 | String m2Home = System.getenv( "M2_HOME" ); |
346 346 | if ( m2Home == null || !( maven = new File( m2Home ) ).exists() ) |
347 347 | { |
348 - | String mavenVersion = "apache-maven-3.6.0"; |
349 - | maven = new File( mavenVersion ); |
348 + | maven = new File( Constants.MAVEN_FOLDER ); |
350 349 | |
351 350 | if ( !maven.exists() ) |
352 351 | { |
353 352 | System.out.println( "Maven does not exist, downloading. Please wait." ); |
354 353 | |
355 - | File mvnTemp = new File( mavenVersion + "-bin.zip" ); |
354 + | File mvnTemp = new File( Constants.MAVEN_FILE ); |
356 355 | mvnTemp.deleteOnExit(); |
357 356 | |
358 - | // https://www.apache.org/dist/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.zip.sha512 |
359 - | download( "https://static.spigotmc.org/maven/" + mvnTemp.getName(), mvnTemp, HashFormat.SHA512, "7d14ab2b713880538974aa361b987231473fbbed20e83586d542c691ace1139026f232bd46fdcce5e8887f528ab1c3fbfc1b2adec90518b6941235952d3868e9" ); |
357 + | download( Constants.MAVEN_DOWNLOAD, mvnTemp, HashFormat.SHA512, Constants.MAVEN_HASH ); |
360 358 | unzip( mvnTemp, new File( "." ) ); |
361 359 | mvnTemp.delete(); |
362 360 | } |
363 361 | } |
364 362 | |
365 363 | Git bukkitGit = Git.open( bukkit ); |
366 364 | Git craftBukkitGit = Git.open( craftBukkit ); |
367 365 | Git spigotGit = Git.open( spigot ); |
368 366 | Git buildGit = Git.open( buildData ); |
369 367 | |