Better Animals Plus

Better Animals Plus

22M Downloads

Maven pom dependencies specify mapped versions

maxanier opened this issue ยท 3 comments

commented

Describe the bug
The pom files published to your maven list _mapped_ version names from your local workspace. These mapped jar files are of course not available when depending on your mod.

This is somewhat an issue with ForgeGradle MinecraftForge/ForgeGradle#584, but there are workarounds. E.g. https://github.com/MinecraftModDevelopment/Gradle-Collection/blob/eba777ee097440f8eac2d7fd81907c65ce66d9de/minecraft/maven_nomcp.gradle#L27-L40
which simply removes these dependencies from the pom file. Of course this means one has to manually make sure they are available when depending on your mod.

To Reproduce
Steps to reproduce the behavior:

  1. Depend on betteranimalplus in another workspace/mod implementation fg.deobf("dev.itsmeow.betteranimalsplus:betteranimalsplus:1.16.5-10.2.0")
  2. Error
Cause 1: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find net.minecraftforge:forge:1.16.5-36.1.0_mapped_snapshot_20210309-1.16.5_at_d3a0a663a7bf9448ba3f2749dd63154a494c8627.
Required by:
    project : > dev.itsmeow.betteranimalsplus:betteranimalsplus:1.16.5-10.2.0
Cause 2: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find dev.itsmeow.imdlib:imdlib:1.16.5-a1c85a9097402bbdb0cf30f7537e2cb0fd65a207_mapped_snapshot_20210309-1.16.5.
Required by:
    project : > dev.itsmeow.betteranimalsplus:betteranimalsplus:1.16.5-10.2.0
Cause 3: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find curse.maven:AppleSkin-248787:3035787_mapped_snapshot_20210309-1.16.5.
Required by:
    project : > dev.itsmeow.betteranimalsplus:betteranimalsplus:1.16.5-10.2.0
Cause 4: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find top.theillusivec4.curios:curios-forge:1.16.5-4.0.5.0_mapped_snapshot_20210309-1.16.5.
Required by:
    project : > dev.itsmeow.betteranimalsplus:betteranimalsplus:1.16.5-10.2.0
Cause 5: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find curse.maven:BiomesOPlenty-3035787:3246295_mapped_snapshot_20210309-1.16.5.
Required by:
    project : > dev.itsmeow.betteranimalsplus:betteranimalsplus:1.16.5-10.2.0
Cause 6: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find curse.maven:TraverseReforged-267769:3157857_mapped_snapshot_20210309-1.16.5.
Required by:
    project : > dev.itsmeow.betteranimalsplus:betteranimalsplus:1.16.5-10.2.0

https://maven.itsmeow.dev/dev/itsmeow/betteranimalsplus/betteranimalsplus/1.16.5-10.2.0/betteranimalsplus-1.16.5-10.2.0.pom

commented

Just specify

implementation fg.deobf("...") {
    transitive = false
}

I will look into fixing this, though

commented

All of the dependencies of BAP are dev runtime only or optional, so there are no other dependencies needed on the other side

commented

I have fixed the POM dependency filtering, next time a maven publish happens this won't be an issue