Refactor all OBC, libs, and NMS into versioned packages.

org.bukkit.craftbukkit and net.minecraft.server will now include the
minecraft version in the package name. As the internal implementations
are known to change dramatically, this refactor reduces the strain on
support requests due to version mismatching.

org.bukkit.craftbukkit.libs will also have version numbers for each
imported set of packages. These are not dictated by the minecraft
version number. This is done to prevent future incompatibilities.
This commit is contained in:
Wesley Wolfe 2012-12-05 14:43:45 -06:00
parent 1af83da760
commit 453f49abd9

44
pom.xml
View file

@ -12,6 +12,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<api.version>unknown</api.version>
<junit.version>4.10</junit.version>
<minecraft.version>1.4.5</minecraft.version>
</properties>
<scm>
@ -51,14 +52,14 @@
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.4.5-R0.3-SNAPSHOT</version>
<version>${project.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>minecraft-server</artifactId>
<version>1.4.5</version>
<version>${minecraft.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
@ -98,6 +99,11 @@
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>org.avaje</groupId>
<artifactId>ebean</artifactId>
@ -144,11 +150,6 @@
<version>1.2.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.1</version>
</dependency>
</dependencies>
<!-- This builds a completely 'ready to start' jar with all dependencies inside -->
@ -225,42 +226,53 @@
<relocations>
<relocation>
<pattern>org.bouncycastle</pattern>
<shadedPattern>net.minecraft.org.bouncycastle</shadedPattern>
<shadedPattern>net.minecraft.${minecraft.version}.org.bouncycastle</shadedPattern>
</relocation>
<relocation>
<pattern>joptsimple</pattern>
<shadedPattern>org.bukkit.craftbukkit.libs.joptsimple</shadedPattern>
<shadedPattern>org.bukkit.craftbukkit.libs.${project.dependencies[2].version}.joptsimple</shadedPattern>
</relocation>
<relocation>
<pattern>jline</pattern>
<shadedPattern>org.bukkit.craftbukkit.libs.jline</shadedPattern>
<shadedPattern>org.bukkit.craftbukkit.libs.${project.dependencies[3].version}.jline</shadedPattern>
</relocation>
<relocation>
<pattern>org.ibex</pattern>
<shadedPattern>org.bukkit.craftbukkit.libs.org.ibex</shadedPattern>
<shadedPattern>org.bukkit.craftbukkit.libs.${project.dependencies[5].version}.org.ibex</shadedPattern>
</relocation>
<relocation>
<pattern>org.gjt</pattern>
<shadedPattern>org.bukkit.craftbukkit.libs.org.gjt</shadedPattern>
<shadedPattern>org.bukkit.craftbukkit.libs.${project.dependencies[6].version}.org.gjt</shadedPattern>
</relocation>
<relocation>
<pattern>com.google.gson</pattern>
<shadedPattern>org.bukkit.craftbukkit.libs.com.google.gson</shadedPattern>
<shadedPattern>org.bukkit.craftbukkit.libs.${project.dependencies[7].version}.com.google.gson</shadedPattern>
</relocation>
<!-- These contain native libraries, and cannot be properly relocated
<relocation>
<pattern>org.fusesource</pattern>
<shadedPattern>org.bukkit.craftbukkit.libs.org.fusesource</shadedPattern>
<shadedPattern>org.bukkit.craftbukkit.libs.${project.dependencies[4].version}.org.fusesource</shadedPattern>
</relocation>
<relocation>
<pattern>org.sqlite</pattern>
<shadedPattern>org.bukkit.craftbukkit.libs.org.sqlite</shadedPattern>
<shadedPattern>org.bukkit.craftbukkit.libs.${project.dependencies[5].version}.org.sqlite</shadedPattern>
</relocation>
<relocation>
<pattern>com.mysql</pattern>
<shadedPattern>org.bukkit.craftbukkit.libs.com.mysql</shadedPattern>
<shadedPattern>org.bukkit.craftbukkit.libs.${project.dependencies[6].version}.com.mysql</shadedPattern>
</relocation>
!-->
<relocation>
<pattern>org.bukkit.craftbukkit</pattern>
<shadedPattern>org.bukkit.craftbukkit.${minecraft.version}</shadedPattern>
<excludes>
<exclude>org.bukkit.craftbukkit.Main*</exclude>
</excludes>
</relocation>
<relocation>
<pattern>net.minecraft.server</pattern>
<shadedPattern>net.minecraft.server.${minecraft.version}</shadedPattern>
</relocation>
</relocations>
<artifactSet>
<excludes>