Alvinn8 / paper-nms-maven-plugin

A maven plugin for using NMS on paper with Mojang mappings.
MIT License
115 stars 8 forks source link

Paper API is shaded when using this plugin #29

Closed DerEchtePilz closed 5 months ago

DerEchtePilz commented 5 months ago

Okay, maybe I am doing something extremely wrong but I have followed every step in the README.md and have successfully added Paper's internals to the project I am working on. However, ever since I am using this plugin it seems that the entire Paper API and its dependencies are also shaded which I obviously don't want. Is this something your plugin might cause? Please scream at me if you need any more information, this is my pom.xml, however: https://pastes.dev/EUUR81wshP This is within the dev/commandapi-paper branch on the https://github.com/JorelAli/CommandAPI repository if you need a further look.

Alvinn8 commented 5 months ago

Hello! This plugin should not change the behavior of the Maven shade plugin.

I took a look at the repository you provided, and it looks like you have commandapi-paper-core as a dependency with scope compile. Furthermore, commandapi-paper-core depends on paper-api with scope compile (link). The Maven shade plugin will include all dependencies with scope compile or runtime, and the compile scope is transitive. This is likely why paper-api is being shaded in your case.

Btw, the paper-nms dependency already has paper-api as a dependency, so you don't need to add both paper-nms and paper-api in your pom, just paper-nms is sufficient.

DerEchtePilz commented 5 months ago

Furthermore, commandapi-paper-core depends on paper-api with scope compile (link)

Thanks, this was what I was searching for, just a bit embarrassed that I assumed it was your plugin and didn't take a look at other pom files.

Btw, the paper-nms dependency already has paper-api as a dependency, so you don't need to add both paper-nms and paper-api in your pom, just paper-nms is sufficient.

Thanks, I'll keep that in mind.