Fix for #77 and #84

Check if artifact is needed by a user-defined dependency using PluginDescriptor.getPlugin().getDependencies().