Add default specification entries, default implementation entries, and Git hash to MANIFEST.MF
#419
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For the Launchable work, we need a way to get the commit hash from a given artifact in order to define a Launchable build. While this can be derived at runtime by dereferencing the tag back to a commit using the GitHub API, it is simpler to bake this information into the relevant artifact in the first place. This PR adds the following to
MANIFEST.MF
for all core component.jar
files (including shaded JARs) and.war
files:Specification-Title
:${project.name}
Specification-Version
: ${MAJOR.MINOR}`Implementation-Title
:${project.description}
Implementation-Version
:${project.version}
Implementation-Build
: Git hashThe last of these is not part of the default implementation entries but is provided by Build Number Maven Plugin. We use the name
Implementation-Build
since it is somewhat standardized by the example linked in the previous sentence.I tested this in Jenkins core,
version-number
, and Remoting, by building JARs, shaded JARs, and WARs (both a Jenkins core JAR and a Jenkins core WAR) and verifying that they all hadImplementation-Title
,Implementation-Version
, andImplementation-Build
set appropriately. I also verified that this allowed me to remove the custom setting ofImplementation-Version
fromjenkinsci/jenkins/war/pom.xml
(this is handled now byaddDefaultImplementationEntries
) and the ``buildnumber-maven-pluginconfiguration from
plugin-compat-tester` (this is now standard configuration for all Jenkins components).Once this is merged I want to get the same change in for plugins. Plugins never have WAR packaging, but they do have HPI packaging which creates both a
.jar
and a.hpi
file (with the.jar
file inside of the.hpi
file). The recent work done by @jtnord and myself has added aPlugin-GitHash
entry to theMANIFEST.MF
file here, but I want to rename that toImplementation-Build
for consistency with this PR.