common icon indicating copy to clipboard operation
common copied to clipboard

Generate OSGi infos in the manifest

Open laeubi opened this issue 3 months ago • 4 comments

🤔 What's the problem you're trying to solve?

I use this in an Eclipse plugin and currently need to repack the original cucumber jars into an OSGi bundle, but adding the info at the source has much benefits:

  1. Additional metadata in the manifest is ignored by other tools
  2. At build time there is the most rich information about used packages and versions so better metadata can be generated
  3. Using the original jar ensures it can later be identified as such e.g. with a security scanner
  4. No risk that different people repack the same jar under the same name with different settings
  5. only do the work once than on each build / consumer

✨ What's your proposed solution?

Embed OSGi metadata into the manifest of the produced jar file at the first place using a lightweight approach that enhances the usual manifest with OSGi metadata.

⛏ Have you considered any alternatives or workarounds?

Currently the metadata is added after the fact but this has several drawbacks e.g. its easy to get out of sync and there is a risk of the same people doing slightly different things multiple time.

📚 Any additional context?

The preparation work for this was done here:

  • https://github.com/cucumber/cucumber-parent/pull/61

This needs to be adapted in the following repositories to be fully effective but can be done iteratively, e.g we likely want to start at the root and after the release go on with the next:

  • [x] https://github.com/cucumber/messages/ --> https://github.com/cucumber/messages/pull/344
  • [x] https://github.com/cucumber/gherkin/ --> https://github.com/cucumber/gherkin/pull/485
  • [x] https://github.com/cucumber/cucumber-expressions --> https://github.com/cucumber/cucumber-expressions/pull/372
  • [ ] https://github.com/cucumber/gherkin-utils/ --> https://github.com/cucumber/gherkin-utils/pull/148
  • [ ] https://github.com/cucumber/cucumber-jvm
  • [ ] ...

laeubi avatar Oct 03 '25 18:10 laeubi

Should these too be included?

  • [ ] https://github.com/cucumber/ci-environment
  • [ ] https://github.com/cucumber/cucumber-json-formatter
  • [ ] https://github.com/cucumber/html-formatter/
  • [ ] https://github.com/cucumber/junit-xml-formatter
  • [ ] https://github.com/cucumber/pretty-formatter
  • [ ] https://github.com/cucumber/query/
  • [ ] https://github.com/cucumber/tag-expressions/
  • [ ] https://github.com/cucumber/teamcity-formatter/
  • [ ] https://github.com/cucumber/testng-xml-formatter

mpkorstanje avatar Oct 06 '25 23:10 mpkorstanje

@mpkorstanje I need to check but need to first tart from the bottom, would you mind to release gherkin? The I can update gherkin-utils.

laeubi avatar Nov 05 '25 17:11 laeubi

Done.

mpkorstanje avatar Nov 05 '25 18:11 mpkorstanje

As it is now released I would suggest to add the verification steps I previously did manually during the build, for that I have created:

  • https://github.com/cucumber/cucumber-parent/pull/65

would be good if it can be reviewed / merged / released but it is not urgent and I can proceed without it in the meanwhile but it seems a good choice on the long run.

laeubi avatar Dec 13 '25 06:12 laeubi