From 59469f0fef76246025b63f0dd3287cfa19a06505 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 11 Aug 2017 16:39:47 +1000 Subject: Various updates --- pom.xml | 35 +++++++++-------------- src/main/java/org/spigotmc/builder/Bootstrap.java | 25 ++++++++++++++++ src/main/java/org/spigotmc/builder/Builder.java | 10 ++----- 3 files changed, 40 insertions(+), 30 deletions(-) create mode 100644 src/main/java/org/spigotmc/builder/Bootstrap.java diff --git a/pom.xml b/pom.xml index 8241a56..ca01763 100644 --- a/pom.xml +++ b/pom.xml @@ -13,6 +13,8 @@ unknown + 1.6 + 1.6 UTF-8 @@ -21,11 +23,12 @@ com.custardsource.dybdob java-diff-utils-copy 1.0.1 + compile com.google.guava guava - 19.0 + 20.0 compile @@ -37,35 +40,32 @@ org.eclipse.jgit org.eclipse.jgit - 4.4.1.201607150455-r + 4.5.2.201704071617-r compile org.slf4j slf4j-jdk14 - 1.7.21 + 1.7.25 compile org.projectlombok lombok - 1.16.12 + 1.16.16 provided commons-io commons-io 2.5 - - - org.apache.commons - commons-compress - 1.12 + compile com.google.code.gson gson - 2.7 + 2.8.1 + compile @@ -88,23 +88,14 @@ - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.6 - 1.6 - - org.apache.maven.plugins maven-jar-plugin - 2.5 + 3.0.2 - org.spigotmc.builder.Builder + org.spigotmc.builder.Bootstrap ${describe} @@ -113,7 +104,7 @@ org.apache.maven.plugins maven-shade-plugin - 2.3 + 3.0.0 package diff --git a/src/main/java/org/spigotmc/builder/Bootstrap.java b/src/main/java/org/spigotmc/builder/Bootstrap.java new file mode 100644 index 0000000..aba3d81 --- /dev/null +++ b/src/main/java/org/spigotmc/builder/Bootstrap.java @@ -0,0 +1,25 @@ +package org.spigotmc.builder; + +public class Bootstrap +{ + + public static void main(String[] args) throws Exception + { + float javaVersion = Float.parseFloat( System.getProperty( "java.class.version" ) ); + + if ( javaVersion < 51.0 ) + { + System.err.println( "Outdated Java detected (" + javaVersion + "). BuildTools requires at least Java 7. Please update Java and try again." ); + System.err.println( "You may use java -version to double check your Java version." ); + return; + } + + if ( javaVersion != 52.0 ) + { + System.err.println( "*** WARNING *** You are not using Java 8. Java 8 is the only supported version for Minecraft versions >= 1.12." ); + System.err.println( "*** WARNING *** Please use java -version to check your version and note that early access versions of Java are not supported either." ); + } + + Builder.main( args ); + } +} diff --git a/src/main/java/org/spigotmc/builder/Builder.java b/src/main/java/org/spigotmc/builder/Builder.java index 7cab141..774ddad 100644 --- a/src/main/java/org/spigotmc/builder/Builder.java +++ b/src/main/java/org/spigotmc/builder/Builder.java @@ -138,12 +138,6 @@ public class Builder logOutput(); - if ( Float.parseFloat( System.getProperty( "java.class.version" ) ) != 52.0 ) - { - System.err.println( "*** WARNING *** You are not using Java 8. Java 8 is the only supported version for Minecraft versions >= 1.12." ); - System.err.println( "*** WARNING *** Please use java -version to check your version and note that early access versions of Java are not supported either." ); - } - try { runProcess( CWD, "sh", "-c", "exit" ); @@ -201,7 +195,7 @@ public class Builder String m2Home = System.getenv( "M2_HOME" ); if ( m2Home == null || !( maven = new File( m2Home ) ).exists() ) { - maven = new File( "apache-maven-3.2.5" ); + maven = new File( "apache-maven-3.5.0" ); if ( !maven.exists() ) { @@ -210,7 +204,7 @@ public class Builder File mvnTemp = new File( "mvn.zip" ); mvnTemp.deleteOnExit(); - download( "https://static.spigotmc.org/maven/apache-maven-3.2.5-bin.zip", mvnTemp ); + download( "https://static.spigotmc.org/maven/apache-maven-3.5.0-bin.zip", mvnTemp ); unzip( mvnTemp, new File( "." ) ); } } -- cgit v1.2.3