mirror of
https://hub.spigotmc.org/stash/scm/spigot/buildtools.git
synced 2025-09-18 21:45:56 +00:00
Remove warnings for non-existent Maven profiles
This commit is contained in:
parent
1f7c0c759c
commit
2f33f39df4
1 changed files with 29 additions and 14 deletions
|
@ -498,14 +498,14 @@ public class Builder
|
||||||
// 1.17+
|
// 1.17+
|
||||||
if ( memberMappings.exists() )
|
if ( memberMappings.exists() )
|
||||||
{
|
{
|
||||||
runMaven( CWD, "install:install-file", "-Dfile=" + memberMappings, "-Dpackaging=csrg", "-DgroupId=org.spigotmc",
|
runMavenInstall( CWD, "install:install-file", "-Dfile=" + memberMappings, "-Dpackaging=csrg", "-DgroupId=org.spigotmc",
|
||||||
"-DartifactId=minecraft-server", "-Dversion=" + versionInfo.getSpigotVersion(), "-Dclassifier=maps-spigot-members", "-DgeneratePom=false" );
|
"-DartifactId=minecraft-server", "-Dversion=" + versionInfo.getSpigotVersion(), "-Dclassifier=maps-spigot-members", "-DgeneratePom=false" );
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1.17
|
// 1.17
|
||||||
if ( fieldMappings.exists() )
|
if ( fieldMappings.exists() )
|
||||||
{
|
{
|
||||||
runMaven( CWD, "install:install-file", "-Dfile=" + fieldMappings, "-Dpackaging=csrg", "-DgroupId=org.spigotmc",
|
runMavenInstall( CWD, "install:install-file", "-Dfile=" + fieldMappings, "-Dpackaging=csrg", "-DgroupId=org.spigotmc",
|
||||||
"-DartifactId=minecraft-server", "-Dversion=" + versionInfo.getSpigotVersion(), "-Dclassifier=maps-spigot-fields", "-DgeneratePom=false" );
|
"-DartifactId=minecraft-server", "-Dversion=" + versionInfo.getSpigotVersion(), "-Dclassifier=maps-spigot-fields", "-DgeneratePom=false" );
|
||||||
|
|
||||||
File combinedMappings = new File( workDir, "bukkit-" + mappingsVersion + "-combined.csrg" );
|
File combinedMappings = new File( workDir, "bukkit-" + mappingsVersion + "-combined.csrg" );
|
||||||
|
@ -514,17 +514,17 @@ public class Builder
|
||||||
mapUtil.makeCombinedMaps( combinedMappings, memberMappings );
|
mapUtil.makeCombinedMaps( combinedMappings, memberMappings );
|
||||||
}
|
}
|
||||||
|
|
||||||
runMaven( CWD, "install:install-file", "-Dfile=" + combinedMappings, "-Dpackaging=csrg", "-DgroupId=org.spigotmc",
|
runMavenInstall( CWD, "install:install-file", "-Dfile=" + combinedMappings, "-Dpackaging=csrg", "-DgroupId=org.spigotmc",
|
||||||
"-DartifactId=minecraft-server", "-Dversion=" + versionInfo.getSpigotVersion(), "-Dclassifier=maps-spigot", "-DgeneratePom=false" );
|
"-DartifactId=minecraft-server", "-Dversion=" + versionInfo.getSpigotVersion(), "-Dclassifier=maps-spigot", "-DgeneratePom=false" );
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
// 1.18+
|
// 1.18+
|
||||||
runMaven( CWD, "install:install-file", "-Dfile=" + classMappings, "-Dpackaging=csrg", "-DgroupId=org.spigotmc",
|
runMavenInstall( CWD, "install:install-file", "-Dfile=" + classMappings, "-Dpackaging=csrg", "-DgroupId=org.spigotmc",
|
||||||
"-DartifactId=minecraft-server", "-Dversion=" + versionInfo.getSpigotVersion(), "-Dclassifier=maps-spigot", "-DgeneratePom=false" );
|
"-DartifactId=minecraft-server", "-Dversion=" + versionInfo.getSpigotVersion(), "-Dclassifier=maps-spigot", "-DgeneratePom=false" );
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1.17+
|
// 1.17+
|
||||||
runMaven( CWD, "install:install-file", "-Dfile=" + mojangMappings, "-Dpackaging=txt", "-DgroupId=org.spigotmc",
|
runMavenInstall( CWD, "install:install-file", "-Dfile=" + mojangMappings, "-Dpackaging=txt", "-DgroupId=org.spigotmc",
|
||||||
"-DartifactId=minecraft-server", "-Dversion=" + versionInfo.getSpigotVersion(), "-Dclassifier=maps-mojang", "-DgeneratePom=false" );
|
"-DartifactId=minecraft-server", "-Dversion=" + versionInfo.getSpigotVersion(), "-Dclassifier=maps-mojang", "-DgeneratePom=false" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -552,7 +552,7 @@ public class Builder
|
||||||
( versionInfo.getPackageMappings() == null ) ? fieldMappings.getPath() : "BuildData/mappings/" + versionInfo.getPackageMappings(), finalMappedJar.getPath() ).split( " " ) );
|
( versionInfo.getPackageMappings() == null ) ? fieldMappings.getPath() : "BuildData/mappings/" + versionInfo.getPackageMappings(), finalMappedJar.getPath() ).split( " " ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
runMaven( CWD, "install:install-file", "-Dfile=" + finalMappedJar, "-Dpackaging=jar", "-DgroupId=org.spigotmc",
|
runMavenInstall( CWD, "install:install-file", "-Dfile=" + finalMappedJar, "-Dpackaging=jar", "-DgroupId=org.spigotmc",
|
||||||
"-DartifactId=minecraft-server", "-Dversion=" + ( versionInfo.getSpigotVersion() != null ? versionInfo.getSpigotVersion() : versionInfo.getMinecraftVersion() + "-SNAPSHOT" ) );
|
"-DartifactId=minecraft-server", "-Dversion=" + ( versionInfo.getSpigotVersion() != null ? versionInfo.getSpigotVersion() : versionInfo.getMinecraftVersion() + "-SNAPSHOT" ) );
|
||||||
|
|
||||||
File decompileDir = new File( workDir, "decompile-" + mappingsVersion );
|
File decompileDir = new File( workDir, "decompile-" + mappingsVersion );
|
||||||
|
@ -687,18 +687,18 @@ public class Builder
|
||||||
if ( compile.contains( Compile.CRAFTBUKKIT ) )
|
if ( compile.contains( Compile.CRAFTBUKKIT ) )
|
||||||
{
|
{
|
||||||
System.out.println( "Compiling Bukkit" );
|
System.out.println( "Compiling Bukkit" );
|
||||||
runMaven( bukkit, "clean", "install" );
|
runMavenAPI( bukkit, "clean", "install" );
|
||||||
if ( generateDocs )
|
if ( generateDocs )
|
||||||
{
|
{
|
||||||
runMaven( bukkit, "javadoc:jar" );
|
runMavenAPI( bukkit, "javadoc:jar" );
|
||||||
}
|
}
|
||||||
if ( generateSource )
|
if ( generateSource )
|
||||||
{
|
{
|
||||||
runMaven( bukkit, "source:jar" );
|
runMavenAPI( bukkit, "source:jar" );
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println( "Compiling CraftBukkit" );
|
System.out.println( "Compiling CraftBukkit" );
|
||||||
runMaven( craftBukkit, "clean", "install" );
|
runMavenServer( craftBukkit, "clean", "install" );
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -709,16 +709,16 @@ public class Builder
|
||||||
if ( compile.contains( Compile.SPIGOT ) )
|
if ( compile.contains( Compile.SPIGOT ) )
|
||||||
{
|
{
|
||||||
System.out.println( "Compiling Spigot & Spigot-API" );
|
System.out.println( "Compiling Spigot & Spigot-API" );
|
||||||
runMaven( spigot, "clean", "install" );
|
runMavenServer( spigot, "clean", "install" );
|
||||||
|
|
||||||
File spigotApi = new File( spigot, "Spigot-API" );
|
File spigotApi = new File( spigot, "Spigot-API" );
|
||||||
if ( generateDocs )
|
if ( generateDocs )
|
||||||
{
|
{
|
||||||
runMaven( spigotApi, "javadoc:jar" );
|
runMavenAPI( spigotApi, "javadoc:jar" );
|
||||||
}
|
}
|
||||||
if ( generateSource )
|
if ( generateSource )
|
||||||
{
|
{
|
||||||
runMaven( spigotApi, "source:jar" );
|
runMavenAPI( spigotApi, "source:jar" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch ( Exception ex )
|
} catch ( Exception ex )
|
||||||
|
@ -845,7 +845,22 @@ public class Builder
|
||||||
return !result.getTrackingRefUpdates().isEmpty();
|
return !result.getTrackingRefUpdates().isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int runMaven(File workDir, String... command) throws Exception
|
private static int runMavenInstall(File workDir, String... command) throws Exception
|
||||||
|
{
|
||||||
|
return runMaven0( workDir, false, false, command );
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int runMavenAPI(File workDir, String... command) throws Exception
|
||||||
|
{
|
||||||
|
return runMaven0( workDir, dev, false, command );
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int runMavenServer(File workDir, String... command) throws Exception
|
||||||
|
{
|
||||||
|
return runMaven0( workDir, dev, remapped, command );
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int runMaven0(File workDir, boolean dev, boolean remapped, String... command) throws Exception
|
||||||
{
|
{
|
||||||
List<String> args = new LinkedList<>();
|
List<String> args = new LinkedList<>();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue