java.lang.NoClassDefFoundError in SpongeForge

Hello,

I created a plugin for my server. I have a problem with me dependencies
When i used this build.gradle i don’t have error But I do not already have the Nuvotifier plugin because

apply plugin: 'java'

version = '1.0'

sourceSets {
  main {
    resources.srcDirs = ["src/main/java"]
  }
}

repositories {
    mavenCentral()
    maven {
        name = 'sponge maven repo'
        url = 'http://repo.spongepowered.org/maven'
    }
}

dependencies {
    compile 'org.spongepowered:spongeapi:5.0.0'
}
dependencies {
    compile 'ninja.leaping.configurate:configurate-hocon:0.1'
}
configurations {
    shade
    compile.extendsFrom shade
}
dependencies {
	shade files('plugins/nuvotifier-universal-2.3.3.jar')
}

jar {
    baseName = 'Mineaurion Vote'
    version =  '0.2.0'
    configurations.shade.each { dep ->
        from(project.zipTree(dep)){
            exclude 'META-INF', 'META-INF/**'
        }
    }
}

And when i used this:
apply plugin: ‘java’

version = '1.0'

sourceSets {
  main {
    resources.srcDirs = ["src/main/java"]
  }
}

repositories {
    mavenCentral()
    maven {
        name = 'sponge maven repo'
        url = 'http://repo.spongepowered.org/maven'
    }
}

dependencies {
    compile 'org.spongepowered:spongeapi:5.0.0'
}
dependencies {
    compile 'ninja.leaping.configurate:configurate-hocon:0.1'
}

dependencies {
	compile files('plugins/nuvotifier-universal-2.3.3.jar')
}

jar {
    baseName = 'Mineaurion Vote'
    version =  '0.2.0'
}

I have this error : http://pastebin.com/nG4bJPy4

So I would like to know how to make my plugin work by going already Nuvotifier

Looks like you may need Votifier on the classpath as well:

java.lang.NoClassDefFoundError: com/vexsoftware/votifier/model/Vote

Also, you can merge all the dependencies blocks into one.

Sponge ships with most of the Configurate flavors; you don’t need to specify a dependency on one since it’s automatically added by SpongeAPI. Also, you don’t have to do the sourceSets thing; it already does src/[main|test]/<language>

I’m sorry it’s my first plugin so I don’t understand all
@JBYoshi. How to add votifier to classpath?
@pie_flavor the sourceSets it’s for include my config file. I do not understand what you mean by a dependency on one since it’s automatically added by SpongeAPI. If i don’t add dependecy of votifier I have a lot of mistakes

The classpath is just all of your code, plus all the code from dependencies. Just add Votifier to your dependencies the same way you did with NuVotifier.

Votifier is NuVotifie https://github.com/NuVotifier/NuVotifier/tree/master/common/src/main/java/com/vexsoftware/votifier/model

I said you don’t need a dependency on Configurate since Sponge already has one. And you don’t need to explicitly declare your sourceSets - source code goes in src/main/java, non-code goes in src/main/resources. This is the default, so it’s pointless to declare it explicitly.