Skip to content

Commit

Permalink
remove Plugin-Module manifest entry
Browse files Browse the repository at this point in the history
THe manifest entry was not correctly caclulated, being different
depending on where you ran maven from and if you also had any local
aggrgator project or not.

The original intention and need of this was to use the path from the git
repostory for the PCT, but the code changed from using a git path along
the way.

As a result the code produced non deterministic results and the PCT
which needed this information has been updated to not need this in jenkinsci/plugin-compat-tester#557

because the information is non deterministic and there are no consumers
of this, it is simpler to remove the code.
  • Loading branch information
jtnord committed Jun 7, 2023
1 parent 1e85fd4 commit ba4dc55
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 5 deletions.
3 changes: 0 additions & 3 deletions src/it/metadata-it/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ try (JarFile j1 = new JarFile(p1)) {
assert attributes.getValue('Plugin-ScmConnection').equals('scm:git:https://github.com/jenkinsci/maven-hpi-plugin.git')
def matcher = attributes.getValue('Plugin-GitHash') =~ pattern
assert matcher.matches()
assert attributes.getValue('Plugin-Module').equals('plugin1')
}


Expand Down Expand Up @@ -71,8 +70,6 @@ try (JarFile j2 = new JarFile(p2)) {
assert attributes.getValue('Plugin-ScmConnection').equals('scm:git:https://github.com/jenkinsci/maven-hpi-plugin.git')
def matcher = attributes.getValue('Plugin-GitHash') =~ pattern
assert matcher.matches()
assert attributes.getValue('Plugin-Module').equals('plugin2')

}

return true;
1 change: 0 additions & 1 deletion src/it/verify-it/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ Files.newInputStream(new File(basedir, 'target/verify-it/META-INF/MANIFEST.MF').
assert manifest.getMainAttributes().getValue('Plugin-ScmUrl').equals('https://github.com/jenkinsci/verify-it-plugin')
def matcher = manifest.getMainAttributes().getValue('Plugin-GitHash') =~ pattern
assert matcher.matches()
assert manifest.getMainAttributes().getValue('Plugin-Module') == null
assert manifest.getMainAttributes().getValue('Plugin-Version').startsWith('1.0-SNAPSHOT')
assert manifest.getMainAttributes().getValue('Short-Name').equals('verify-it')
assert manifest.getMainAttributes().getValue('Specification-Title').equals('MyNewPlugin') // was project.description in previous versions, now project.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ protected void setAttributes(Manifest.ExistingSection mainSection)
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);
}

Expand Down

0 comments on commit ba4dc55

Please sign in to comment.