Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-2080

plugin not correctly escaping paths with spaces on Windows

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.0.0-M6
    • None
    • Maven Surefire Plugin
    • None

    Description

      Environment:

      Apache Maven 3.8.5 (3599d3414f046de2324203b78ddcf9b5e4388aa0)
      Maven home: C:\apache\apache-maven-3.8.5-bin\apache-maven-3.8.5
      Java version: 1.8.0_322, vendor: Temurin, runtime: C:\Users\qwertyuiop\.jdks\temurin-1.8.0_322\jre
      Default locale: en_US, platform encoding: Cp1252
      OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
      

      When surefire forks a process, it is not putting double quotes around the -Djava.library.path.

      -Djava.library.path=C:\Users\qwertyuiop\Intel lij\tika-2.3.0\tika-parsers\tika-parsers-standard\tika-parsers-standard-modules\tika-parser-ocr-module\..\..\..\..\tika-parent\lib
      

      should be:

      -Djava.library.path=\\"C:\Users\qwertyuiop\Intel lij\tika-2.3.0\tika-parsers\tika-parsers-standard\tika-parsers-standard-modules\tika-parser-ocr-module\..\..\..\..\tika-parent\lib\\"
      

      relevant parts of debug log

      [INFO]
      
      [INFO] -------------------------------------------------------
      
      [INFO]  T E S T S
      
      [INFO] -------------------------------------------------------
      
      [DEBUG] Determined Maven Process ID 23984
      
      [DEBUG] Fork Channel [1] connection string 'pipe://1' for the implementation class org.apache.maven.plugin.surefire.extensions.LegacyForkChannel
      
      [DEBUG] boot classpath:  C:\Users\qwertyuiop\.m2\repository\org\apache\maven\surefire\surefire-booter\3.0.0-M6\surefire-booter-3.0.0-M6.jar  C:\Users\qwertyuiop\.m2\repository\org\apache\maven\surefire\surefire-api\3.0.0-M6\surefire-api-3.0.0-M6.jar ...  C:\Users\qwertyuiop\.m2\repository\org\apache\maven\surefire\common-java5\3.0.0-M6\common-java5-3.0.0-M6.jar  C:\Users\qwertyuiop\.m2\repository\org\junit\platform\junit-platform-launcher\1.8.2\junit-platform-launcher-1.8.2.jar
      
      [DEBUG] boot(compact) classpath:  surefire-booter-3.0.0-M6.jar ...  common-java5-3.0.0-M6.jar  junit-platform-launcher-1.8.2.jar
      
      [DEBUG] Forking command line: cmd.exe /X /C "C:\Users\qwertyuiop\.jdks\temurin-1.8.0_322\jre\bin\java -Djava.library.path=C:\Users\qwertyuiop\Intel lij\tika-2.3.0\tika-parsers\tika-parsers-standard\tika-parsers-standard-modules\tika-parser-ocr-module\..\..\..\..\tika-parent\lib -jar C:\Users\qwertyuiop\AppData\Local\Temp\surefire4418642757462327849\surefirebooter8349798871024649967.jar C:\Users\qwertyuiop\AppData\Local\Temp\surefire4418642757462327849 2022-04-27T11-23-51_092-jvmRun1 surefire4635556381728461740tmp surefire_07657113776812865966tmp"
      
      [DEBUG] Fork Channel [1] connected to the client.
      
      Error: Could not find or load main class lij\tika-2.3.0\tika-parsers\tika-parsers-standard\tika-parsers-standard-modules\tika-parser-ocr-module\..\..\..\..\tika-parent\lib
      
      [DEBUG] Closing the fork 1 after not saying Good Bye.
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            tallison Tim Allison
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: