mirror of
https://hub.spigotmc.org/stash/scm/spigot/spigot.git
synced 2025-09-18 21:33:01 +00:00
129 lines
5.7 KiB
Diff
129 lines
5.7 KiB
Diff
From a092e7f2678ab2c553537c542c22e1b69ffc1cad 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/checkstyle.xml b/checkstyle.xml
|
|
index 63914723e..01319e4f7 100644
|
|
--- a/checkstyle.xml
|
|
+++ b/checkstyle.xml
|
|
@@ -25,6 +25,9 @@
|
|
<property name="checks" value="UnusedImports"/>
|
|
<property name="files" value=".*[/\\]net[/\\]minecraft[/\\]server[/\\].*"/>
|
|
</module>
|
|
+ <module name="SuppressionSingleFilter">
|
|
+ <property name="checks" value="LeftCurly|ParenPad"/>
|
|
+ </module>
|
|
|
|
<module name="TreeWalker">
|
|
<!-- See https://checkstyle.org/config_javadoc.html -->
|
|
@@ -46,6 +49,13 @@
|
|
<module name="SuppressWithNearbyCommentFilter">
|
|
<property name="commentFormat" value="CraftBukkit"/>
|
|
</module>
|
|
+ <module name="SuppressionCommentFilter">
|
|
+ <property name="offCommentFormat" value="Spigot start"/>
|
|
+ <property name="onCommentFormat" value="Spigot end"/>
|
|
+ </module>
|
|
+ <module name="SuppressWithNearbyCommentFilter">
|
|
+ <property name="commentFormat" value="Spigot"/>
|
|
+ </module>
|
|
|
|
<!-- See http://checkstyle.sourceforge.net/config_imports.html -->
|
|
<module name="AvoidStarImport">
|
|
diff --git a/pom.xml b/pom.xml
|
|
index 1a65c6262..9dafd60b6 100644
|
|
--- a/pom.xml
|
|
+++ b/pom.xml
|
|
@@ -1,11 +1,11 @@
|
|
<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.17.1-R0.1-SNAPSHOT</version>
|
|
- <name>CraftBukkit</name>
|
|
+ <name>Spigot</name>
|
|
<url>https://www.spigotmc.org/</url>
|
|
|
|
<properties>
|
|
@@ -18,10 +18,17 @@
|
|
<maven.compiler.target>1.8</maven.compiler.target>
|
|
</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>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
@@ -116,11 +123,26 @@
|
|
<groupId>net.md-5</groupId>
|
|
<artifactId>scriptus</artifactId>
|
|
<version>0.4.1</version>
|
|
- <configuration>
|
|
- <format>${bt.name}-Bukkit-%s</format>
|
|
- </configuration>
|
|
<executions>
|
|
<execution>
|
|
+ <id>ex-spigot</id>
|
|
+ <configuration>
|
|
+ <format>${bt.name}-Spigot-%s</format>
|
|
+ <scmDirectory>../</scmDirectory>
|
|
+ <descriptionProperty>spigot.desc</descriptionProperty>
|
|
+ </configuration>
|
|
+ <phase>initialize</phase>
|
|
+ <goals>
|
|
+ <goal>describe</goal>
|
|
+ </goals>
|
|
+ </execution>
|
|
+ <execution>
|
|
+ <id>ex-craftbukkit</id>
|
|
+ <configuration>
|
|
+ <format>-%s</format>
|
|
+ <scmDirectory>../../CraftBukkit</scmDirectory>
|
|
+ <descriptionProperty>craftbukkit.desc</descriptionProperty>
|
|
+ </configuration>
|
|
<phase>initialize</phase>
|
|
<goals>
|
|
<goal>describe</goal>
|
|
@@ -153,7 +175,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>${project.build.outputTimestamp}</Implementation-Vendor>
|
|
<Specification-Title>Bukkit</Specification-Title>
|
|
<Specification-Version>${api.version}</Specification-Version>
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
|
index f905d17b6..93046379d 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.25.1
|
|
|