How can i exclude jars/dependencies from test [solved]

thx raffael for your answer.
unfortunately it doesn’t work that way either. ‘testRuntime’ uses the libs/classpaths from runtime, which i want to prevent. i’ve checked it with:

 test {
    configurations.testCompile.each { println "testCompile:" + it } 
}

i’ve solved it with a little workaround using the war plugin and a new configuration:

configurations {
    addWarArchive
}
war {
   // additional libraries only for the war-archive.
   classpath configurations.addWarArchive 
}
dependencies {
    ... 
    addWarArchive 'org.jboss.weld.servlet:weld-servlet:2.2.+'
    ...
}

thanks again, and hope this helps others.