From d064ccabc4d023dbba3dc7d011ff0e0d7db2e0b4 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 6 Aug 2020 16:25:45 +0100 Subject: [PATCH] Ensure Maven plugin descriptor inputs are out-of-date on version change Closes gh-22766 --- .../boot/build/mavenplugin/MavenPluginPlugin.java | 1 + 1 file changed, 1 insertion(+) diff --git a/buildSrc/src/main/java/org/springframework/boot/build/mavenplugin/MavenPluginPlugin.java b/buildSrc/src/main/java/org/springframework/boot/build/mavenplugin/MavenPluginPlugin.java index ec048adb01..82a2aec057 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/mavenplugin/MavenPluginPlugin.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/mavenplugin/MavenPluginPlugin.java @@ -177,6 +177,7 @@ public class MavenPluginPlugin implements Plugin { pluginDescriptorInputs.from(pomFile, (copy) -> replaceVersionPlaceholder(copy, project)); pluginDescriptorInputs.from(sourceSet.getOutput().getClassesDirs(), (sync) -> sync.into("target/classes")); pluginDescriptorInputs.from(sourceSet.getAllJava().getSrcDirs(), (sync) -> sync.into("src/main/java")); + pluginDescriptorInputs.getInputs().property("version", project.getVersion()); return pluginDescriptorInputs; }