Maven import creating duplicate classes in IntelliJ

Viewed 624

Since I'm relatively new to maven, I followed a quick tutorial to set up maven and install it to create a custom plugin in IntelliJ. I followed the tutorial outlined here. After running BuildTools.jar and running $ mvn install, I tried creating a new project.

However, every time I reference a class in net.minecraft.server.v1_8_R3, it brings up two options: one with the reference net.minecraft.server.v1_8_R3 and another duplicate in net.minecraft.server.v1_8_R3.v1_8_R3. I doubt this is supposed to happen since when I add it as a regular dependency in IntelliJ, the duplicates disappear and all the net minecraft classes share net.minecraft.server.v1_8_R3.

PacketPlayOutPosition shares net.minecraft.server.v1_8_R3 and net.minecraft.server.v1_8_R3.v1_8_R3

Another weird thing I've found is how certain classes, for instance CraftPlayer, will only show up once with the path net.minecraft.server.v1_8_R3.v1_8_R3 which might possibly indicate that this isn't a duplicate folder...?

How would I fix this? I've tried google searching but nothing relevant seems to come up. Would running $mvn install again do anything?

1 Answers

run mvn:dependency tree and resolve the jar conflicts

Related