spigot/CraftBukkit-Patches/0001-POM-Changes.patch

126 lines
4.9 KiB
Diff
Raw Normal View History

2014-12-16 10:12:27 +11:00
From 7819cebcf89352affe402247b6f134fa96f5038e Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
2013-07-02 13:14:40 +10:00
Date: Tue, 2 Jul 2013 13:07:39 +1000
2013-04-23 11:35:18 +10:00
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
2014-12-16 10:12:27 +11:00
index af5aea5..95c4594 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,12 +1,12 @@
<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.8-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>
2014-12-16 10:12:27 +11:00
@@ -18,10 +18,17 @@
2013-10-24 21:23:24 +11:00
<buildtag.suffix></buildtag.suffix>
</properties>
+ <parent>
+ <groupId>org.spigotmc</groupId>
+ <artifactId>spigot-parent</artifactId>
+ <version>dev-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
<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>
2014-12-16 10:12:27 +11:00
@@ -110,21 +117,39 @@
<!-- This builds a completely 'ready to start' jar with all dependencies inside -->
<build>
- <defaultGoal>clean install</defaultGoal>
2013-04-23 11:35:18 +10:00
+ <defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<groupId>com.lukegb.mojo</groupId>
<artifactId>gitdescribe-maven-plugin</artifactId>
2014-12-05 21:38:02 +00:00
<version>2.0</version>
<configuration>
2013-10-24 21:23:24 +11:00
- <outputPrefix>${buildtag.prefix}</outputPrefix>
- <outputPostfix>${buildtag.suffix}</outputPostfix>
2014-12-05 21:38:02 +00:00
<extraArguments>
<extraArgument>--always</extraArgument>
</extraArguments>
</configuration>
<executions>
2013-10-24 21:23:24 +11:00
<execution>
+ <id>ex-spigot</id>
+ <configuration>
+ <outputPrefix>git-Spigot-</outputPrefix>
+ <outputPostfix></outputPostfix>
+ <scmDirectory>../</scmDirectory>
+ <descriptionProperty>spigot.desc</descriptionProperty>
+ </configuration>
+ <phase>compile</phase>
+ <goals>
+ <goal>gitdescribe</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>ex-craftbukkit</id>
+ <configuration>
+ <outputPrefix>-</outputPrefix>
+ <outputPostfix></outputPostfix>
+ <scmDirectory>../../CraftBukkit</scmDirectory>
+ <descriptionProperty>craftbukkit.desc</descriptionProperty>
+ </configuration>
<phase>compile</phase>
<goals>
<goal>gitdescribe</goal>
2014-12-16 10:12:27 +11:00
@@ -141,7 +166,7 @@
<manifestEntries>
<Main-Class>org.bukkit.craftbukkit.Main</Main-Class>
<Implementation-Title>CraftBukkit</Implementation-Title>
- <Implementation-Version>${describe}</Implementation-Version>
+ <Implementation-Version>${spigot.desc}${craftbukkit.desc}</Implementation-Version>
<Implementation-Vendor>Bukkit Team</Implementation-Vendor>
<Specification-Title>Bukkit</Specification-Title>
<Specification-Version>${api.version}</Specification-Version>
2014-12-16 10:12:27 +11:00
@@ -174,7 +199,7 @@
<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/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
index f905d17..9304637 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
@@ -11,7 +11,7 @@ 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) {
--
2.1.0