mirror of
https://hub.spigotmc.org/stash/scm/spigot/buildtools.git
synced 2025-08-05 16:59:05 +00:00
BUILDTOOLS-118: Check M2_HOME for Maven install and attempt to use it.
I have a feeling this could break people already using BuildTools with a bad M2_HOME directory, but that's really their issue.
This commit is contained in:
parent
e9ee0aa0b7
commit
191c281ceb
1 changed files with 11 additions and 6 deletions
|
@ -171,7 +171,11 @@ public class Builder
|
||||||
clone( "https://hub.spigotmc.org/stash/scm/spigot/builddata.git", buildData );
|
clone( "https://hub.spigotmc.org/stash/scm/spigot/builddata.git", buildData );
|
||||||
}
|
}
|
||||||
|
|
||||||
File maven = new File( "apache-maven-3.2.5" );
|
File maven = new File( System.getenv( "M2_HOME" ) );
|
||||||
|
if ( !maven.exists() )
|
||||||
|
{
|
||||||
|
maven = new File( "apache-maven-3.2.5" );
|
||||||
|
|
||||||
if ( !maven.exists() )
|
if ( !maven.exists() )
|
||||||
{
|
{
|
||||||
System.out.println( "Maven does not exist, downloading. Please wait." );
|
System.out.println( "Maven does not exist, downloading. Please wait." );
|
||||||
|
@ -182,6 +186,7 @@ public class Builder
|
||||||
download( "http://static.spigotmc.org/maven/apache-maven-3.2.5-bin.zip", mvnTemp );
|
download( "http://static.spigotmc.org/maven/apache-maven-3.2.5-bin.zip", mvnTemp );
|
||||||
unzip( mvnTemp, new File( "." ) );
|
unzip( mvnTemp, new File( "." ) );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String mvn = maven.getAbsolutePath() + "/bin/mvn";
|
String mvn = maven.getAbsolutePath() + "/bin/mvn";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue