Task not copying files iterating through custom configurations

(Johnny Fugaban) #1

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 {
dependencies {
activeMqDependencies “org.springframework:spring-web: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 ')

(Chris Doré) #2

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

war {
    classpath configurations.activeMqDependencies

(Johnny Fugaban) #3

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