Uploaded image for project: 'tools.deps'
  1. TDEPS-29

Updates to pom continually adds superfluous newlines under Java 9

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:

      version: 1.9.0.297

      java version "9.0.1"
      Java(TM) SE Runtime Environment (build 9.0.1+11)
      Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)

      Description

      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"?>
      <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>pom-bug</groupId>
        <artifactId>pom-bug</artifactId>
        <version>0.1.0</version>
        <name>pom-bug</name>
        <dependencies>
          <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"?>
      <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>pom-bug</groupId>
      
        <artifactId>pom-bug</artifactId>
      
        <version>0.1.0</version>
      /private/tmp/pom-bug> clj -Spom 2>/dev/null
      /private/tmp/pom-bug> head pom.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <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>pom-bug</groupId>
      
      

      It's worth noting that this happens only under Java 9. Java 1.8.0_152 works as expected.

        Attachments

          Activity

            People

            • Assignee:
              alexmiller Alex Miller
              Reporter:
              potetm Timothy Pote
            • Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: