Task not copying files iterating through custom configurations

What am I missing with the following setup?
Iterating through the custom configuration would give me the full path
of the declared jar file but will not copy them when running the task?

configurations {
activeMqDependencies
}
dependencies {
activeMqDependencies “org.springframework:spring-web:4.3.18.RELEASE@jar”,
“org.springframework:spring-webmvc:4.3.18.RELEASE@jar”

}

war {

task copyActiveMqDependencySpringWebMvc {
configurations.activeMqDependencySpringWebMvc.each {
jarFile ->
def filePath = jarFile.path
copy {
from file(filePath)
into (‘WEB-INF/lib’)
}
}
}

it.dependsOn('copyActiveMqDependencySpringWebMvc ')
}

You should not need to create an additional task, just:

war {
    classpath configurations.activeMqDependencies
}

Perfect - that did the trick. Thank you so much!!!