You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using generating JAXB classes using the latest xjc with the -mark-generated argument, it generates the classes with the jakarta.annotation.Generated annotation. I have the generated sources in the build folder, but also have sources in the same package as what xjc generates to, so when using Jacoco I can't exclude solely based on package name. Jacoco can automatically exclude a class from reports if it has a @generated annotation. Because the current scoping of the annotation is to SOURCE, jacoco doesn't see it and thus includes the classes in the report.
I'll submit a PR, but thought I would create the issue as well for any discussion.
The text was updated successfully, but these errors were encountered:
I second this. It would be great if the Retention would be changed to Runtime. That something is generated isn't just useful information for the source code itself, but also for the byte code and at runtime. And it's a bit of a bummer that the two provided annotations javax.annotations.Generated and jakarta.annotations.Generated can't be used in situations where this type of information is required at runtime.
When using generating JAXB classes using the latest xjc with the -mark-generated argument, it generates the classes with the jakarta.annotation.Generated annotation. I have the generated sources in the build folder, but also have sources in the same package as what xjc generates to, so when using Jacoco I can't exclude solely based on package name. Jacoco can automatically exclude a class from reports if it has a @generated annotation. Because the current scoping of the annotation is to SOURCE, jacoco doesn't see it and thus includes the classes in the report.
I'll submit a PR, but thought I would create the issue as well for any discussion.
The text was updated successfully, but these errors were encountered: