From 68a46ee08f67dbbe9d5225182d1ab1584baa10e7 Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Wed, 19 Apr 2023 07:47:58 -0700 Subject: [PATCH] Begin mini-migration from `Plugin-GitHash` to `Implementation-Build` (#471) --- .../maven/plugins/hpi/AbstractJenkinsManifestMojo.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/jenkinsci/maven/plugins/hpi/AbstractJenkinsManifestMojo.java b/src/main/java/org/jenkinsci/maven/plugins/hpi/AbstractJenkinsManifestMojo.java index 63fbd8c5cd..cebe641022 100644 --- a/src/main/java/org/jenkinsci/maven/plugins/hpi/AbstractJenkinsManifestMojo.java +++ b/src/main/java/org/jenkinsci/maven/plugins/hpi/AbstractJenkinsManifestMojo.java @@ -220,8 +220,11 @@ protected void setAttributes(Manifest.ExistingSection mainSection) throws MojoEx addAttributeIfNotNull(mainSection, "Plugin-ScmConnection", project.getScm().getConnection()); addAttributeIfNotNull(mainSection, "Plugin-ScmTag", project.getScm().getTag()); addAttributeIfNotNull(mainSection, "Plugin-ScmUrl", project.getScm().getUrl()); - addAttributeIfNotNull(mainSection, "Plugin-GitHash", getGitHeadSha1()); + String gitHash = getGitHeadSha1(); + // Deprecated: Use "Implementation-Build" for consistency with core and core components + addAttributeIfNotNull(mainSection, "Plugin-GitHash", gitHash); addAttributeIfNotNull(mainSection, "Plugin-Module", getModule()); + addAttributeIfNotNull(mainSection, "Implementation-Build", gitHash); } /**