jenkinsci / plugin-compat-tester

Jenkins Plugin Compatibility Tester
MIT License
46 stars 55 forks source link

Honor `Add-Opens` directives from the Jenkins WAR under test #572

Closed basil closed 1 year ago

basil commented 1 year ago

In a regular plugin build, the hpi:test-runtime mojo is responsible for setting the Add-Opens directives as they are contained in the Jenkins WAR under test, but this was not being called from PCT. Instead we were using the fallback code path from https://github.com/jenkinsci/plugin-pom/blob/620115c9dee7ddd9f8c8b42f968f44d54278c671/pom.xml#L65-L66 which works but is fragile, as the Add-Opens directives may change in future versions of Jenkins. To test this I ran PCT with these changes and verified that Add-Opens from the WAR under test were being honored. I also ran BOM tests here: https://ci.jenkins.io/blue/organizations/jenkins/Tools%2Fbom/detail/PR-2217/1/pipeline