diff --git a/gradle-jnlp-plugin/src/main/groovy/de/gliderpilot/gradle/jnlp/war/GradleJnlpWarPluginExtension.groovy b/gradle-jnlp-plugin/src/main/groovy/de/gliderpilot/gradle/jnlp/war/GradleJnlpWarPluginExtension.groovy index d7267da..deca670 100644 --- a/gradle-jnlp-plugin/src/main/groovy/de/gliderpilot/gradle/jnlp/war/GradleJnlpWarPluginExtension.groovy +++ b/gradle-jnlp-plugin/src/main/groovy/de/gliderpilot/gradle/jnlp/war/GradleJnlpWarPluginExtension.groovy @@ -87,14 +87,15 @@ class GradleJnlpWarPluginExtension { duplicatesStrategy = DuplicatesStrategy.EXCLUDE includeEmptyDirs = false } + project.tasks.create("configureWar").doLast { + launchers.values()*.resolve() + launchersSpec.eachFile { + it.path = it.path.replaceAll('.*?/(.*)', '$1') + } + } project.war { + dependsOn project.tasks.configureWar with launchersSpec - doFirst { - launchers.values()*.resolve() - launchersSpec.eachFile { - it.path = it.path.replaceAll('.*?/(.*)', '$1') - } - } } }