Open oleg-nenashev opened 3 years ago
Such file could be also a resolution for https://issues.jenkins-ci.org/browse/JENKINS-48885 in Jenkins Test Harness. It makes a JSON format preferable so that we do not need to include YAML libs into the developer tooling
@oleg-nenashev So if I understand correctly in order to get this solved JFR needs to have a build step that generates a manifest file(update center JSON) that plugin manager can then pick up.
Question: In order to implement the build step in the maven hpi plugin we would need to read the dependencies from the manifest file right ? Would this mean submitting a patch to maven HPI plugin modifying the generation of the manifest ?
Alternative: Could we read it from the class path and generate the manifest ourselves ?
In order to implement the build step in the maven hpi plugin we would need to read the dependencies from the manifest file right ?
No, you would not. Maven HPI Plugin is the thing which generates this file. You do not need to implement file roundtrips, all the logic is already there.
Would this mean submitting a patch to maven HPI plugin modifying the generation of the manifest ?
Likely. Note that plugin manifest file may have two meanings: MANIFEST.MF for HPI files, and a standalone file for multiple files. Here I mean the latter
Could we read it from the class path and generate the manifest ourselves ?
It might be possible to extract existing files and put them somewhere accessible to the resource classloader.
https://github.com/oleg-nenashev/lib-bom-jep309/pull/1 as a foundation lib
JFR Packaging POM currently prepares a Jenkinsfile Runner bundle (appassembler ZIP) where plugins are included into the bundle. They are available in the classpath, but JFR Plugin Manager cannot recognize the plugins because of the missing plugin Manifest resources. After that, API like
PluginManager#getPlugin(String)
do not work properly and cause random issues in plugins. It would be nice to have a way to read proper manifests of plugins included into classpath.Acceptance criteria
References
Example MANIFEST file