Skip to content

Commit

Permalink
Merge pull request #249 from grails/248-execution-failed-for-task-boo…
Browse files Browse the repository at this point in the history
…twar

Update GroovyPagePlugin.groovy
  • Loading branch information
puneetbehl authored Nov 3, 2023
2 parents 5cd345d + 564dd48 commit 10ff30f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import org.apache.tools.ant.taskdefs.condition.Os
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.artifacts.Configuration
import org.gradle.api.file.DuplicatesStrategy
import org.gradle.api.file.FileCollection
import org.gradle.api.tasks.SourceSet
import org.gradle.api.tasks.SourceSetOutput
Expand Down Expand Up @@ -86,6 +87,7 @@ class GroovyPagePlugin implements Plugin<Project> {

allTasks.withType(War).configureEach { War war ->
war.dependsOn compileGroovyPages
war.duplicatesStrategy = DuplicatesStrategy.EXCLUDE
if (war.name == 'bootWar') {
war.from(destDir) {
into("WEB-INF/classes")
Expand All @@ -101,14 +103,14 @@ class GroovyPagePlugin implements Plugin<Project> {
}
}
allTasks.withType(Jar).configureEach { Jar jar ->
jar.dependsOn compileGroovyPages
jar.duplicatesStrategy = DuplicatesStrategy.EXCLUDE
if(!(jar instanceof War)) {
if (jar.name == 'bootJar') {
jar.dependsOn compileGroovyPages
jar.from(destDir) {
into("BOOT-INF/classes")
}
} else if (jar.name == 'jar') {
jar.dependsOn compileGroovyPages
jar.from destDir
}
}
Expand Down

0 comments on commit 10ff30f

Please sign in to comment.