jaxb2-maven-plugin icon indicating copy to clipboard operation
jaxb2-maven-plugin copied to clipboard

schemagen won't add JavaDoc annotations when class name contains underscore

Open libertysoftware opened this issue 7 years ago • 3 comments

Plugin: jaxb2-maven-plugin Version: 2.3.1

Scenario: I have a Java class with JAXB annotations and JavaDocs on fields. JAXB is configured to generate schema based on FIELDS.

Expected result: XSD schema is generated and contains documentation annotations picked from JavaDoc comments in source java class.

Actual result: XSD schema doesn't contain documentation annotations.

Observation: Actual result only happens if java class contains underscore in it's name (e.g. DummyRequest_v1.java)

libertysoftware avatar Sep 11 '17 12:09 libertysoftware

I presume that you mean in your observation that XSD documentation annotations are only added when the class name does not contain underscores, right?

This seems like a bug in the pattern matching within the JavaDoc processor. Could you create an IT with this situation?

lennartj avatar Dec 02 '17 10:12 lennartj

The bug(comments from Javadoc not copied into XSD) manifests itself only when the class name contains an underscore. What is an IT?

libertysoftware avatar Dec 03 '17 15:12 libertysoftware

Ah. "IT" == "Integration Test".

You can find all the integration tests under src/it within the codebase.

lennartj avatar May 12 '18 17:05 lennartj