joelittlejohn / jsonschema2pojo

Generate Java types from JSON or JSON Schema and annotate those types for data-binding with Jackson, Gson, etc
http://www.jsonschema2pojo.org
Apache License 2.0
6.24k stars 1.66k forks source link

Support custom Generated annotation that uses runtime retention policy required by JaCoCo #1497

Open marioja opened 1 year ago

marioja commented 1 year ago

The javax.annotation.Generated or javax.annotation.processing.Generated annotation all use SOURCE retention policy which is not compatible with JaCoCo code coverage which works at the byte code level. We need to have the ability to use a custom generated annotation instead of or in addition to the javax annotation.

marioja commented 1 year ago

I am working on a pull request.

joelittlejohn commented 1 year ago

I think we can use an existing pull request for this.

What annotation does JaCoCo expect?

marioja commented 1 year ago

JaCoCo requires a runtime retention policy annotation. What existing pull request are you talking about?

marioja commented 1 year ago

Have a look at PR #1499 and let me know if you need anything.

marioja commented 1 year ago

Hi @joelittlejohn, is there any issue with my PR #1499? You might have been waiting until I was done and I think I am and just need your review.

marioja commented 1 year ago

@joelittlejohn Could this PR #1499 be merged or do you require something more from me? I would like to use it in our builds and would appreciate if this could be accepted. Thanks

marioja commented 1 year ago

@joelittlejohn gentle ping. Do you think PR #1499 could be merged? @billkoch is this something you would use? I have been using the artifact from my repo for a number of months with no issues and I would like to switch to @joelittlejohn's artifact.

billkoch commented 1 year ago

@marioja this is definitely something I would use! Without this feature, I've been adding the generated classes to a JaCoCo ignore list.

Thank you for taking the time to report the issue and open a PR for it! ❤️

marioja commented 1 year ago

@billkoch Well I pinged joelittlejohn, so all we can do is wait for him to respond on the PR.