Under Java 9, each invocation of clj -Spom
to update an existing pom causes newlines to be added.
`
/private/tmp/pom-bug> head pom.xml
<?xml version="1.0" encoding="UTF-8"?>
4.0.0
pom-bug
pom-bug
0.1.0
pom-bug
<dependency>
<groupId>org.clojure</groupId>
/private/tmp/pom-bug> clj -Spom 2>/dev/null
/private/tmp/pom-bug> head pom.xml
<?xml version="1.0" encoding="UTF-8"?>
4.0.0
pom-bug
pom-bug
0.1.0
/private/tmp/pom-bug> clj -Spom 2>/dev/null
/private/tmp/pom-bug> head pom.xml
<?xml version="1.0" encoding="UTF-8"?>
4.0.0
pom-bug
`
It's worth noting that this happens only under Java 9. Java 1.8.0_152 works as expected.