summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2014-12-06 09:21:52 +1100
committermd_5 <git@md-5.net>2014-12-06 09:21:52 +1100
commit33532cd4f1b5acdd75a80bc6ad3701bd8a1f8889 (patch)
tree1b282787965b7a2520d2c722ae0fc926df4a9172
parent1ef992afbdba0126f057dab1e4fb3a6a44da069d (diff)
downloadbuildtools-33532cd4f1b5acdd75a80bc6ad3701bd8a1f8889.tar
buildtools-33532cd4f1b5acdd75a80bc6ad3701bd8a1f8889.tar.gz
buildtools-33532cd4f1b5acdd75a80bc6ad3701bd8a1f8889.tar.lz
buildtools-33532cd4f1b5acdd75a80bc6ad3701bd8a1f8889.tar.xz
buildtools-33532cd4f1b5acdd75a80bc6ad3701bd8a1f8889.zip
Use single maven script for both platforms
-rw-r--r--src/main/java/org/spigotmc/builder/Builder.java17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/main/java/org/spigotmc/builder/Builder.java b/src/main/java/org/spigotmc/builder/Builder.java
index ba192b3..bc5e4c1 100644
--- a/src/main/java/org/spigotmc/builder/Builder.java
+++ b/src/main/java/org/spigotmc/builder/Builder.java
@@ -124,14 +124,7 @@ public class Builder
unzip( mvnTemp, new File( "." ) );
}
- String mvnCmd = maven.getAbsolutePath() + "/bin/mvn";
- if ( IS_WINDOWS )
- {
- mvnCmd += ".bat";
- } else
- {
- mvnCmd = "/bin/sh " + mvnCmd;
- }
+ String mvn = maven.getAbsolutePath() + "/bin/mvn";
Git bukkitGit = Git.open( bukkit );
Git craftBukkitGit = Git.open( craftBukkit );
@@ -180,7 +173,7 @@ public class Builder
"-m", "BuildData/mappings/package.srg", "-o", finalMappedJar.getPath() );
}
- runProcess( CWD, mvnCmd, "install:install-file", "-Dfile=" + finalMappedJar, "-Dpackaging=jar", "-DgroupId=org.spigotmc",
+ runProcess( CWD, "sh", mvn, "install:install-file", "-Dfile=" + finalMappedJar, "-Dpackaging=jar", "-DgroupId=org.spigotmc",
"-DartifactId=minecraft-server", "-Dversion=1.8-SNAPSHOT" );
File decompileDir = new File( workDir, "decompile-" + mappingsVersion );
@@ -263,17 +256,17 @@ public class Builder
// Git spigotApiGit = Git.open( spigotApi );
// Git spigotServerGit = Git.open( spigotServer );
System.out.println( "Compiling Bukkit" );
- runProcess( bukkit, mvnCmd, "clean", "install" );
+ runProcess( bukkit, "sh", mvn, "clean", "install" );
System.out.println( "Compiling CraftBukkit" );
- runProcess( craftBukkit, mvnCmd, "clean", "install" );
+ 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, mvnCmd, "clean", "install" );
+ runProcess( spigot, "sh", mvn, "clean", "install" );
} catch ( Exception ex )
{
System.err.println( "Error compiling Spigot, are you running this jar via msysgit?" );