Solved Maven shade hierarchy

Discussion in 'Plugin Development' started by Wingzzz, Jun 24, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    Wingzzz

    Hey, so I've got project A, project B, project C. The first project (A) is using Vault, Bukkit, CraftBukkit as dependencies. I do not specify <scope>, this then allows project B to depend on project A and use it's dependencies. Although due to not specifying scope in project A, it is default to compile for all three of those and in project B it is using the shade plugin to shade project A in. Causing it to shade those three in as well.

    So, I figured, okay I'll just mark my dependencies in project A as <scope>provided</scope> this way in project B it will not attempt to shade them in. Although this then restricts the code in B, not being able to use classes from dependencies in project A.

    The plan is to have A handle dependencies (as it's the core API) whilst other APIs can depend on it to build and extend it's functionality to be APIs for implementations (plugins). A -> B -> C.

    Synopsis:
    Project B can't access code from project A's dependencies, furthermore restricting project C in the same sense.

    Solved: If you're having the same issue, look into <excludes>(blacklist) if you have just one or two of many you don't want in, or if you have only one or two you do want in and many that you don't want to shade in, simply use <includes> (whitelist).
     
Thread Status:
Not open for further replies.

Share This Page