Custom Maven Archetype bad xml formatting with Java 11

Viewed 193

I'm facing a problem with custom Maven archetypes using Java 11.
I defined a custom archetype and when I run the mvn archetype:generate the tool generates a correct application but with a formatting glitch in the file pom.xml.

This is a snipped from the original pom.xml file packed inside the archetype:

    <groupId>$thegroupId</groupId>
    <artifactId>$theArtifactId</artifactId>
    <version>$theVersion</version>
    <description>Archetype standard</description>

This is the pom.xml of the generated Java application

 <groupId>com.aruba.test</groupId>
            
  
  
  
  <artifactId>test-no-db</artifactId>
            
  
  
  
  <version>0.0.1-SNAPSHOT</version>
            
  
  
  
  <description>Archetype standard</description>

Other files (.java and others xml files) are formatted without any glitch. The only trouble is related with the pom.xml file.

I did several tests and the only solution is to downgrade to java 8. Using this JDK version, the pom.xml is formatted as expected.

Is this situation familiar for any?

Thanks

0 Answers
Related