Enable optional source JAR shading via profile shadeSourcesJar

mvn clean source:jar install -PshadeSouresJar

achieves this goal. If 'source:jar' is not specified the resulting
source JAR will not include CraftBukkit sources. Not specifying
'install' will result in an unshaded CraftBukkit source JAR and not
include other sources, making it useless for debugging purposes.
Shade CraftBukkit sources JAR.

Add maven-shade-plugin configuration directives to create sources JAR
and shade contents thereof. This ensures when source:jar goal is run,
relocated CraftBukkit source files are also relocated for debugging
and final code review purposes.

By: Javacraft <frelling@java-craft.com>
This commit is contained in:
CraftBukkit/Spigot 2018-12-05 23:04:41 -05:00
parent 21a5dbe50f
commit 344ffef3d9

View file

@ -154,6 +154,7 @@
<goal>shade</goal>
</goals>
<configuration>
<createSourcesJar>${shadeSourcesJar}</createSourcesJar>
<relocations>
<relocation>
<pattern>joptsimple</pattern>
@ -220,6 +221,13 @@
</build>
<profiles>
<profile>
<id>shadeSourcesJar</id>
<properties>
<shadeSourcesJar>true</shadeSourcesJar>
<shadeSourcesContent>true</shadeSourcesContent>
</properties>
</profile>
<profile>
<id>development</id>
<build>