mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
e7f3ca4505
Allows us much greater control over the Spigot portion of the code and makes us more "proper" Credit to @Dmck2b for originally passing the idea along a while back
169 lines
6.5 KiB
Diff
169 lines
6.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: md_5 <md_5@live.com.au>
|
|
Date: Tue, 2 Jul 2013 13:07:39 +1000
|
|
Subject: [PATCH] POM Changes
|
|
|
|
Basic changes to the build system which mark the artifact as Spigot, and the necessary code changes to ensure proper functionality. Also disables the auto updater provided by CraftBukkit as it is useless to us.
|
|
|
|
diff --git a/pom.xml b/pom.xml
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/pom.xml
|
|
+++ b/pom.xml
|
|
@@ -0,0 +0,0 @@
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
- <groupId>org.bukkit</groupId>
|
|
- <artifactId>craftbukkit</artifactId>
|
|
+ <groupId>org.spigotmc</groupId>
|
|
+ <artifactId>spigot</artifactId>
|
|
<packaging>jar</packaging>
|
|
<version>1.7.10-R0.1-SNAPSHOT</version>
|
|
- <name>CraftBukkit</name>
|
|
- <url>http://www.bukkit.org</url>
|
|
+ <name>Spigot</name>
|
|
+ <url>http://www.spigotmc.org</url>
|
|
|
|
<properties>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
@@ -0,0 +0,0 @@
|
|
<buildtag.suffix></buildtag.suffix>
|
|
</properties>
|
|
|
|
- <scm>
|
|
- <connection>scm:git:git://github.com/Bukkit/CraftBukkit.git</connection>
|
|
- <developerConnection>scm:git:ssh://git@github.com/Bukkit/CraftBukkit.git</developerConnection>
|
|
- <url>https://github.com/Bukkit/CraftBukkit</url>
|
|
- </scm>
|
|
-
|
|
- <distributionManagement>
|
|
- <repository>
|
|
- <id>repobo-rel</id>
|
|
- <name>repo.bukkit.org Releases</name>
|
|
- <url>http://repo.bukkit.org/content/repositories/releases/</url>
|
|
- </repository>
|
|
- <snapshotRepository>
|
|
- <id>repobo-snap</id>
|
|
- <name>repo.bukkit.org Snapshots</name>
|
|
- <url>http://repo.bukkit.org/content/repositories/snapshots/</url>
|
|
- </snapshotRepository>
|
|
- </distributionManagement>
|
|
+ <parent>
|
|
+ <groupId>org.spigotmc</groupId>
|
|
+ <artifactId>spigot-parent</artifactId>
|
|
+ <version>dev-SNAPSHOT</version>
|
|
+ <relativePath>../pom.xml</relativePath>
|
|
+ </parent>
|
|
|
|
<repositories>
|
|
<repository>
|
|
@@ -0,0 +0,0 @@
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
- <groupId>org.bukkit</groupId>
|
|
- <artifactId>bukkit</artifactId>
|
|
+ <groupId>org.spigotmc</groupId>
|
|
+ <artifactId>spigot-api</artifactId>
|
|
<version>${project.version}</version>
|
|
<type>jar</type>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
- <groupId>org.bukkit</groupId>
|
|
+ <groupId>org.spigotmc</groupId>
|
|
<artifactId>minecraft-server</artifactId>
|
|
- <version>${minecraft.version}</version>
|
|
+ <version>${minecraft.version}-SNAPSHOT</version>
|
|
<type>jar</type>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
@@ -0,0 +0,0 @@
|
|
<artifactId>gson</artifactId>
|
|
<version>2.1</version>
|
|
</dependency>
|
|
- <dependency>
|
|
- <groupId>org.avaje</groupId>
|
|
- <artifactId>ebean</artifactId>
|
|
- <version>2.7.3</version>
|
|
- <type>jar</type>
|
|
- <scope>provided</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>org.yaml</groupId>
|
|
- <artifactId>snakeyaml</artifactId>
|
|
- <version>1.9</version>
|
|
- <type>jar</type>
|
|
- <scope>provided</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>com.google.guava</groupId>
|
|
- <artifactId>guava</artifactId>
|
|
- <version>10.0</version>
|
|
- <type>jar</type>
|
|
- <scope>provided</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>commons-lang</groupId>
|
|
- <artifactId>commons-lang</artifactId>
|
|
- <version>2.3</version>
|
|
- <scope>provided</scope>
|
|
- </dependency>
|
|
<!-- testing -->
|
|
<dependency>
|
|
<groupId>junit</groupId>
|
|
@@ -0,0 +0,0 @@
|
|
|
|
<!-- This builds a completely 'ready to start' jar with all dependencies inside -->
|
|
<build>
|
|
- <defaultGoal>clean install</defaultGoal>
|
|
+ <defaultGoal>install</defaultGoal>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>com.lukegb.mojo</groupId>
|
|
<artifactId>gitdescribe-maven-plugin</artifactId>
|
|
<version>1.3</version>
|
|
<configuration>
|
|
- <outputPrefix>${buildtag.prefix}</outputPrefix>
|
|
- <outputPostfix>${buildtag.suffix}</outputPostfix>
|
|
+ <outputPrefix>git-Spigot-</outputPrefix>
|
|
+ <outputPostfix></outputPostfix>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
@@ -0,0 +0,0 @@
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-shade-plugin</artifactId>
|
|
- <version>1.4</version>
|
|
+ <version>2.1</version>
|
|
<executions>
|
|
<execution>
|
|
<phase>package</phase>
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
|
|
loadIcon();
|
|
|
|
updater = new AutoUpdater(new BukkitDLUpdaterService(configuration.getString("auto-updater.host")), getLogger(), configuration.getString("auto-updater.preferred-channel"));
|
|
- updater.setEnabled(configuration.getBoolean("auto-updater.enabled"));
|
|
+ updater.setEnabled(false); // Spigot
|
|
updater.setSuggestChannels(configuration.getBoolean("auto-updater.suggest-channels"));
|
|
updater.getOnBroken().addAll(configuration.getStringList("auto-updater.on-broken"));
|
|
updater.getOnUpdate().addAll(configuration.getStringList("auto-updater.on-update"));
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
|
@@ -0,0 +0,0 @@ public final class Versioning {
|
|
public static String getBukkitVersion() {
|
|
String result = "Unknown-Version";
|
|
|
|
- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/org.bukkit/bukkit/pom.properties");
|
|
+ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/org.spigotmc/spigot-api/pom.properties");
|
|
Properties properties = new Properties();
|
|
|
|
if (stream != null) {
|
|
--
|