Minecrell / plugin-yml

A Gradle plugin that generates plugin.yml for Bukkit/Paper/BungeeCord/Nukkit plugins based on the Gradle project
MIT License
144 stars 16 forks source link

generateLibrariesJson doesn't respect dependency classifier/extension #44

Open Galster-dev opened 1 year ago

Galster-dev commented 1 year ago

Exported dependency coords do not include classifiers and extensions. This leads to some bugs, e.g. server trying to download jar artifact for pom dependency (with PluginLoader implementation presented in README)

My personal workaround atm is exporting artifacts instead of dependencies, but you may not like it because of increased JSON file size.

stephan-gh commented 1 year ago

Could we just filter out pom dependencies completely?

Galster-dev commented 1 year ago

Some pom dependencies are meta packages containing a few jar artifacts

Galster-dev commented 1 year ago

My actual issue happened with InvUi (pom available here). This dependency unfolds to inventory-access-{r1-r14} and invui-core which are jar artifacts and required at runtime.

stephan-gh commented 1 year ago

How would you expect to handle these on the PluginLoader side? Does it provide the necessary functionality to parse & handle metadata packages?

Galster-dev commented 1 year ago

Yes, DefaultArtifact has both constructors with classifiers/extension and can parse it from a single so called "coords" string (format available here)