apache / apache/maven-archetype

[ARCHETYPE-573] Version 3.1.1 generates redundant newlines in POM files

Open
#856 9 comments 0 reactions 0 assignees View on GitHub
bug priority:minor
Dominant language
Java
Stars
148
Forks
181
Avg merge
1d 20h
Merged PRs (30d)
8

Description

**[Christian Schlichtherle](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=christians)** opened **[ARCHETYPE-573](https://issues.apache.org/jira/browse/ARCHETYPE-573?redirect=false)** and commented

Since version 3.1.1, the `generate` goal inserts redundant newlines in the POM file. Here's a step to reproduce:

```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

4.0.0
```

It's working fine with version 3.1.0, though:

```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

4.0.0

com.company.product
basic
1.0-SNAPSHOT
```

 

---

**Affects:** 3.1.1

4 votes, 9 watchers

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.