@@ -118,7 +118,7 @@ Options include:
118118# -- Extract project details --
119119debug " Extracting project details"
120120
121- echoArg=' ${project.version}:${license.licenseName}:${project.parent.groupId}:${project.parent.artifactId}:${project.parent.version}'
121+ echoArg=' ${project.version}:${license.licenseName}:${project.parent.groupId}:${project.parent.artifactId}:${project.parent.version}:${license.skipUpdateProjectLicense} '
122122projectDetails=$( mvn -B -N -Dexec.executable=echo -Dexec.args=" $echoArg " exec:exec -q)
123123test $? -eq 0 || projectDetails=$( mvn -B -U -N -Dexec.executable=echo -Dexec.args=" $echoArg " exec:exec -q)
124124test $? -eq 0 || die " Could not extract version from pom.xml. Error follows:\n$projectDetails "
@@ -132,7 +132,9 @@ projectDetails=$(printf '%s' "$projectDetails" | tr -d '\n')
132132currentVersion=${projectDetails%%:* }
133133projectDetails=${projectDetails#*: }
134134licenseName=${projectDetails%%:* }
135- parentGAV=${projectDetails#*: }
135+ projectDetails=${projectDetails#*: }
136+ parentGAV=${projectDetails%%:* }
137+ skipUpdateProjectLicense=${projectDetails#*: }
136138
137139# -- Sanity checks --
138140debug " Performing sanity checks"
315317fi
316318
317319# Ensure license headers are up-to-date.
318- test " $SKIP_LICENSE_UPDATE " -o -z " $licenseName " -o " $licenseName " = " N/A" || {
320+ test " $SKIP_LICENSE_UPDATE " -o -z " $licenseName " -o " $licenseName " = " N/A" -o " $skipUpdateProjectLicense " = " true " || {
319321 debug " Ensuring that license headers are up-to-date"
320322 mvn license:update-project-license license:update-file-header &&
321323 git add LICENSE.txt || die ' Failed to update copyright blurbs.
0 commit comments