Empty lines in generated XSD

I’m trying to generate schema files from some Java classes using jaxb2-maven-plugin(version 2.5.0). I’m getting the schema1.xsd file without any warnings, but it contains extra empty lines:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0">

  <xs:complexType name="sampleRequest">


      <xs:element minOccurs="0" name="someField" type="xs:string"/>




I couldn’t find out any reason or a way to configure this behavior(http://www.mojohaus.org/jaxb2-maven-plugin/Documentation/v2.2/schemagen-mojo.html). I’m using pretty simple configuration so far:


Am I doing something wrong or is there any way to configure the output? I don’t think that’s an encoding issue since there are actually some indenting spaces on the blank lines, not just line breaks:

enter image description here

I’m using JDK 11

Leave a Reply

Notify of