From c9ae24993c91c91e7271d668994b630d24acdfae Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 12 Dec 2014 11:25:00 +1100 Subject: Add option to skip compilation --- src/main/java/org/spigotmc/builder/Builder.java | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/spigotmc/builder/Builder.java b/src/main/java/org/spigotmc/builder/Builder.java index 3296b0e..3214203 100644 --- a/src/main/java/org/spigotmc/builder/Builder.java +++ b/src/main/java/org/spigotmc/builder/Builder.java @@ -60,6 +60,7 @@ public class Builder public static final String MC_VERSION = "1.8"; private static final File jacobeDir = new File( "jacobe" ); private static boolean dontUpdate; + private static boolean skipCompile; public static void main(String[] args) throws Exception { @@ -73,6 +74,10 @@ public class Builder { dontUpdate = true; } + if ( "--skip-compile".endsWith( s ) ) + { + skipCompile = true; + } } logOutput(); @@ -289,18 +294,25 @@ public class Builder // Git spigotApiGit = Git.open( spigotApi ); // Git spigotServerGit = Git.open( spigotServer ); - System.out.println( "Compiling Bukkit" ); - runProcess( bukkit, "sh", mvn, "clean", "install" ); + if ( !skipCompile ) + { + System.out.println( "Compiling Bukkit" ); + runProcess( bukkit, "sh", mvn, "clean", "install" ); - System.out.println( "Compiling CraftBukkit" ); - runProcess( craftBukkit, "sh", mvn, "clean", "install" ); + System.out.println( "Compiling CraftBukkit" ); + runProcess( craftBukkit, "sh", mvn, "clean", "install" ); + } try { runProcess( spigot, "bash", "applyPatches.sh" ); System.out.println( "*** Spigot patches applied!" ); System.out.println( "Compiling Spigot & Spigot-API" ); - runProcess( spigot, "sh", mvn, "clean", "install" ); + + if ( !skipCompile ) + { + runProcess( spigot, "sh", mvn, "clean", "install" ); + } } catch ( Exception ex ) { System.err.println( "Error compiling Spigot, are you running this jar via msysgit?" ); -- cgit v1.2.3