Open
Description
What happened
During local Maven
build testing, it was found that when the project is placed in a directory with spaces in its name, a compilation error occurs. Specifically, Maven
fails to handle spaces in the path correctly, leading to a build failure.
Upon investigation, it was discovered that the issue was caused by the exec-maven-plugin
plugin mishandling paths with spaces. This problem has been fixed in a newer version of the plugin. Refer to the following links for more details:
- Issue description: Argument file for modulepath is generated wrongly when paths contains spaces mojohaus/exec-maven-plugin#115
- Fix PR: #115 Argument file for modulepath is generated wrongly when paths con… mojohaus/exec-maven-plugin#121
The solution is to upgrade the exec-maven-plugin
plugin version from 1.6.0
to 3.1.0
. Update the version number in the pom.xml
file as follows:
<exec.maven.version>3.1.0</exec.maven.version>
What you expected to happen
Maven should properly handle spaces in the path and successfully complete the project build.
How to reproduce
- Clone the project locally.
- Rename the project directory to include spaces, e.g.,
Open Source
. - Run the Maven build command:
mvn clean install
. - Observe the compilation error.
Environment
- Operating System: All
- Maven Version: 3.x
- JDK Version: 1.8
InLong version
master
InLong Component
Other for not specified component
Are you willing to submit PR?
- Yes, I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct