mirror of
https://hub.spigotmc.org/stash/scm/spigot/buildtools.git
synced 2025-08-21 05:43:44 +00:00
Use BuildTools java version to invoke external java tools
This commit is contained in:
parent
228fddc1b7
commit
38861e44fd
2 changed files with 10 additions and 2 deletions
2
pom.xml
2
pom.xml
|
@ -55,7 +55,7 @@
|
|||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.16.16</version>
|
||||
<version>1.18.4</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -374,7 +374,7 @@ public class Builder
|
|||
File finalMappedJar = new File( workDir, "mapped." + mappingsVersion + ".jar" );
|
||||
if ( !finalMappedJar.exists() )
|
||||
{
|
||||
System.out.println( "Final mapped jar: " + finalMappedJar + " does not exist, creating!" );
|
||||
System.out.println( "Final mapped jar: " + finalMappedJar + " does not exist, creating (please wait)!" );
|
||||
|
||||
File clMappedJar = new File( finalMappedJar + "-cl" );
|
||||
File mMappedJar = new File( finalMappedJar + "-m" );
|
||||
|
@ -632,6 +632,14 @@ public class Builder
|
|||
|
||||
private static int runProcess0(File workDir, String... command) throws Exception
|
||||
{
|
||||
Preconditions.checkArgument( workDir != null, "workDir" );
|
||||
Preconditions.checkArgument( command != null && command.length > 0, "Invalid command" );
|
||||
|
||||
if ( command[0].equals( "java" ) )
|
||||
{
|
||||
command[0] = System.getProperty( "java.home" ) + "/bin/" + command[0];
|
||||
}
|
||||
|
||||
ProcessBuilder pb = new ProcessBuilder( command );
|
||||
pb.directory( workDir );
|
||||
pb.environment().put( "JAVA_HOME", System.getProperty( "java.home" ) );
|
||||
|
|
Loading…
Add table
Reference in a new issue