From 46b3ba6844f5f86094d42eac455de2c43831a15b Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 20 Oct 2018 15:37:44 +1100 Subject: Don't pass in M2_HOME when running maven --- src/main/java/org/spigotmc/builder/Builder.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/spigotmc/builder/Builder.java b/src/main/java/org/spigotmc/builder/Builder.java index d864956..a6bb146 100644 --- a/src/main/java/org/spigotmc/builder/Builder.java +++ b/src/main/java/org/spigotmc/builder/Builder.java @@ -634,6 +634,7 @@ public class Builder ProcessBuilder pb = new ProcessBuilder( command ); pb.directory( workDir ); pb.environment().put( "JAVA_HOME", System.getProperty( "java.home" ) ); + pb.environment().remove( "M2_HOME" ); // Just let maven figure this out from where it is invoked if ( !pb.environment().containsKey( "MAVEN_OPTS" ) ) { pb.environment().put( "MAVEN_OPTS", "-Xmx1024M" ); -- cgit v1.2.3