You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Andreas Dangel (Jira)" <ji...@apache.org> on 2021/08/31 17:29:00 UTC

[jira] [Created] (MPMD-320) Error when using toolchain and spaces in repository path

Andreas Dangel created MPMD-320:
-----------------------------------

             Summary: Error when using toolchain and spaces in repository path
                 Key: MPMD-320
                 URL: https://issues.apache.org/jira/browse/MPMD-320
             Project: Maven PMD Plugin
          Issue Type: Bug
          Components: CPD, PMD
            Reporter: Andreas Dangel
            Assignee: Andreas Dangel
             Fix For: 3.15.0


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

 
{code:java}
[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
 {code}
 

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:
{code:java}
[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:... {code}
So the spaces are encoded with {{%20}} which is wrong...

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)