[ https://issues.apache.org/jira/browse/ARCHETYPE-573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16909579#comment-16909579 ]
Christian Schlichtherle commented on ARCHETYPE-573: --------------------------------------------------- The generated POM is nearly unreadable, which makes me consider version 3.1.1 of the plugin to be broken. I know it can be fixed with a formatter, but then again that should be done by the plugin. BTW: The plugin uses Velocity, right? Since version 2.0, you have fine grained control over generation of new lines. > Version 3.1.1 generates redundant newlines in POM files > ------------------------------------------------------- > > Key: ARCHETYPE-573 > URL: https://issues.apache.org/jira/browse/ARCHETYPE-573 > Project: Maven Archetype > Issue Type: Bug > Components: Generator > Affects Versions: 3.1.1 > Environment: $ mvn -version > Apache Maven 3.6.1 (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555; > 2019-04-04T23:00:29+04:00) > Maven home: /usr/local/Cellar/maven/3.6.1/libexec > Java version: 12.0.1, vendor: Oracle Corporation, runtime: > /Library/Java/JavaVirtualMachines/openjdk-12.0.1.jdk/Contents/Home > Default locale: en_AE, platform encoding: UTF-8 > OS name: "mac os x", version: "10.14.6", arch: "x86_64", family: "mac" > Reporter: Christian Schlichtherle > Priority: Minor > > Since version 3.1.1, the {{generate}} goal inserts redundant newlines in the > POM file. Here's a step to reproduce: > {code:java} > $ mvn org.apache.maven.plugins:maven-archetype-plugin:3.1.1:generate -B \ > -DarchetypeGroupId=global.namespace.truelicense-maven-archetype \ > -DarchetypeArtifactId=truelicense-maven-archetype \ > -DarchetypeVersion=4.0.0-RC1 \ > -DartifactId='basic' \ > -Dcompany='Company Inc.' \ > -DgroupId='com.company.product' \ > -Dpassword='test1234' \ > -Dsubject='Product 1' \ > -Dversion='1.0-SNAPSHOT' > $ head basic/pom.xml > <?xml version="1.0" encoding="UTF-8" standalone="no"?> > <!-- > ~ Copyright (C) 2005 - 2019 Schlichtherle IT Services. > ~ All rights reserved. Use is subject to license terms. > --><project xmlns="http://maven.apache.org/POM/4.0.0" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/xsd/maven-4.0.0.xsd"> > <modelVersion>4.0.0</modelVersion> > {code} > It's working fine with version 3.1.0, though: > {code:java} > $ mvn org.apache.maven.plugins:maven-archetype-plugin:3.1.0:generate -B \ > -DarchetypeGroupId=global.namespace.truelicense-maven-archetype \ > -DarchetypeArtifactId=truelicense-maven-archetype \ > -DarchetypeVersion=4.0.0-RC1 \ > -DartifactId='basic' \ > -Dcompany='Company Inc.' \ > -DgroupId='com.company.product' \ > -Dpassword='test1234' \ > -Dsubject='Product 1' \ > -Dversion='1.0-SNAPSHOT' > $ head basic/pom.xml > <?xml version="1.0" encoding="UTF-8"?> > <!-- > ~ Copyright (C) 2005 - 2019 Schlichtherle IT Services. > ~ All rights reserved. Use is subject to license terms. > --><project xmlns="http://maven.apache.org/POM/4.0.0" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/xsd/maven-4.0.0.xsd"> > <modelVersion>4.0.0</modelVersion> > <groupId>com.company.product</groupId> > <artifactId>basic</artifactId> > <version>1.0-SNAPSHOT</version> > {code} > -- This message was sent by Atlassian JIRA (v7.6.14#76016)