summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2017-08-11 16:39:47 +1000
committermd_5 <git@md-5.net>2017-08-11 16:39:47 +1000
commit59469f0fef76246025b63f0dd3287cfa19a06505 (patch)
treefd90ef59b52ea6ec2b33db3e277a98646dc72494 /src/main/java/org
parent7f7e5316b33097e2cb1f932c4c092fe42677df80 (diff)
downloadbuildtools-59469f0fef76246025b63f0dd3287cfa19a06505.tar
buildtools-59469f0fef76246025b63f0dd3287cfa19a06505.tar.gz
buildtools-59469f0fef76246025b63f0dd3287cfa19a06505.tar.lz
buildtools-59469f0fef76246025b63f0dd3287cfa19a06505.tar.xz
buildtools-59469f0fef76246025b63f0dd3287cfa19a06505.zip
Various updates
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/spigotmc/builder/Bootstrap.java25
-rw-r--r--src/main/java/org/spigotmc/builder/Builder.java10
2 files changed, 27 insertions, 8 deletions
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( "." ) );
}
}