What's wrong with my shading?
DavidTheExplorer opened this issue ยท 4 comments
pom.xml:
<!-- Item-NBT-API -->
<dependency>
<groupId>de.tr7zw</groupId>
<artifactId>item-nbt-api</artifactId>
<version>2.12.0</version>
</dependency>
<relocation>
<pattern>de.tr7zw.changeme.nbtapi</pattern>
<shadedPattern>${shade.base}.nbtapi</shadedPattern>
</relocation>
Error:
[NBTAPI] #########################################- NBTAPI -#########################################[NBTAPI] The NBT-API inside EmployMe is the plugin version, not the API!
[NBTAPI] The plugin itself should never be shaded! Remove the `-plugin` from the dependency and fix your shading setup.
For more info check: https://github.com/tr7zw/Item-NBT-API/wiki/Using-Maven#option-2-shading-the-nbt-api-into-your-plugin
#########################################- NBTAPI -#########################################
That error gets printed when during shading the string de.tr7zw.nbtapi.utils
gets modified by shading(for example using the patter "de.tr7zw" during relocation) and the plugin is not called NBTAPI(in your case it's called EmployMe).
<pattern>de.tr7zw.changeme.nbtapi</pattern>
is correct, check downstream dependencies or the rest of your maven setup.
@tr7zw So what you're telling me is that what I posted is correct, and the problem comes from other parts of my pom?
Yes. https://github.com/tr7zw/Item-NBT-API/wiki/Using-Maven#option-2-shading-the-nbt-api-into-your-plugin I mean, it's 2 lines that shouldn't be messed up(pattern and artifactId) and they look fine. So it's something else, cause right now your plugin managed that "ABC".equals("ABC")
is false https://github.com/tr7zw/Item-NBT-API/blob/master/item-nbt-api/src/main/java/de/tr7zw/changeme/nbtapi/utils/MinecraftVersion.java#L178