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.
This commit is contained in:
Javacraft 2018-12-05 23:04:41 -05:00 committed by md_5
parent ad7b00b762
commit 068dab5be3

View file

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