Skip to content

Commit

Permalink
Fix the default pom file name (#33063)
Browse files Browse the repository at this point in the history
Before this change the default was fixed at compile time and not picking
up changes in the build script.
  • Loading branch information
alpar-t authored and jasontedor committed Aug 22, 2018
1 parent 0cc99d2 commit edd477a
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -531,12 +531,16 @@ class BuildPlugin implements Plugin<Project> {
project.tasks.withType(GenerateMavenPom.class) { GenerateMavenPom generatePOMTask ->
// The GenerateMavenPom task is aggressive about setting the destination, instead of fighting it,
// just make a copy.
generatePOMTask.ext.pomFileName = "${project.archivesBaseName}-${project.version}.pom"
generatePOMTask.ext.pomFileName = null
doLast {
project.copy {
from generatePOMTask.destination
into "${project.buildDir}/distributions"
rename { generatePOMTask.ext.pomFileName }
rename {
generatePOMTask.ext.pomFileName == null ?
"${project.archivesBaseName}-${project.version}.pom" :
generatePOMTask.ext.pomFileName
}
}
}
// build poms with assemble (if the assemble task exists)
Expand Down

0 comments on commit edd477a

Please sign in to comment.