Tried classpathDependencyExcludes, but it does not work: CopyArtifactTest depends on maven-plugin and JenkinsRule depends on maven-plugin.