Uploaded image for project: 'Maven PMD Plugin'
  1. Maven PMD Plugin
  2. MPMD-320

Error when using toolchain and spaces in repository path

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.15.0
    • CPD, PMD
    • None

    Description

      When toolchain is used and the path to the local maven repository contains spaces, then pmd:pmd fails with the following error:

       

      [INFO] --- maven-pmd-plugin:3.14.0:pmd (pmd) @ net.sourceforge.pmd.eclipse.plugin ---
      [INFO] Toolchain in maven-pmd-plugin: JDK[/home/andreas/programs/openjdk/jdk-8]
      Error: Could not find or load main class org.apache.maven.plugins.pmd.exec.PmdExecutor
       

       

      This can be reproduced in a project that uses toolchain like this:

      ./mvnw clean verify -Dmaven.repo.local=$(pwd)/test\ repo

       

       


      Part of the debug log output is this:

      [INFO] Toolchain in maven-pmd-plugin: JDK[/home/andreas/programs/openjdk/jdk-8]
      [DEBUG] Executing: CLASSPATH=/home/andreas/PMD/source/pmd-eclipse-plugin/test%20repo/org/apache/maven/plugins/maven-pmd-plugin/3.14.0/maven-pmd-plugin-3.14.0.jar:/home/andreas/PMD/source/pmd-eclipse-plugin/test%20repo/net/sourceforge/pmd/pmd-core/6.38.0/pmd-core-6.38.0.jar:/home/andreas/PMD/source/pmd-eclipse-plugin/test%20repo/org/antlr/antlr4-runtime/4.7.2/antlr4-runtime-4.7.2.jar:/home/andreas/PMD/source/pmd-eclipse-plugin/test%20repo/com/beust/jcommander/1.48/jcommander-1.48.jar:/home/andreas/PMD/source/pmd-eclipse-plugin/test%20repo/net/sourceforge/saxon/saxon/9.1.0.8/saxon-9.1.0.8.jar:/home/andreas/PMD/source/pmd-eclipse-plugin/test%20repo/org/ow2/asm/asm/9.2/asm-9.2.jar:/home/andreas/PMD/source/pmd-eclipse-plugin/test%20repo/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar:/home/andreas/PMD/source/pmd-eclipse-plugin/test%20repo/net/sourceforge/saxon/saxon/9.1.0.8/saxon-9.1.0.8-dom.jar:/home/andreas/PMD/source/pmd-eclipse-plugin/test%20repo/net/sourceforge/pmd/pmd-java/6.38.0/pmd-java-6.38.0.jar:/home/andreas/PMD/source/pmd-eclipse-plugin/test%20repo/net/sourceforge/pmd/pmd-build-tools-config/16/pmd-build-tools-config-16.jar:/home/andreas/PMD/source/pmd-eclipse-plugin/test%20repo/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar:... 

      So the spaces are encoded with %20 which is wrong...

       

      Attachments

        Issue Links

          Activity

            People

              adangel Andreas Dangel
              adangel Andreas Dangel
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: