Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven command(like install) fails when whitespace in project path #472

Closed
JingangLi opened this issue Mar 2, 2020 · 4 comments
Closed
Labels
needs more info Further information is requested

Comments

@JingangLi
Copy link

Describe the bug
A clear and concise description of what the bug is.

I refer the issue #304. As it solves the problem on that the path of mvn has whitespace. But my issue is for having a whitespace in the path of project's pom file. As I am useing Microsft one driver, the project is saved in the path like: C:\User\userId\OneDrive - mycompany\my project\pom.xml.

The maven install reports issues:
"c:\Users\userId\OneDrive - mycompany\my project\mvnw.cmd" install -f "c:\Users\userId\OneDrive - mycompany\my project\pom.xml"
'C:\Users\userId\OneDrive' is not recognized as an internal or external command,
operable program or batch file.

I have confirmed the issue isn't because of there being whitespace in the path of mvnw.cmd. It is because of whitespace in the path of pom file.

@Eskibear
Copy link
Member

Eskibear commented Mar 2, 2020

What's the version of maven distribution defined for you mvnw?

I remember some older version like 3.5.4 has issue handling quoted whitespaces. See spring-projects/spring-petclinic#404

@Eskibear Eskibear added the needs more info Further information is requested label Mar 2, 2020
@JingangLi
Copy link
Author

Hi @Eskibear ,

This is my mvnw version, I think I am using the latest version. But still face the problem.
"c:...\mvnw.cmd" -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:\Users\ellljjj.m2\wrapper\dists\apache-maven-3.6.3-bin\1iopthnavndlasol9gbrbg6bf2\apache-maven-3.6.3
Java version: 1.8.0_201, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_201\jre
Default locale: en_US, platform encoding: GBK
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Rgds,
Jingang Li

@no-response no-response bot removed the needs more info Further information is requested label Mar 3, 2020
@Eskibear
Copy link
Member

I cannot reproduce the issue with 3.6.3. The maven extension itself is sending the correct command. So it should be an external issue.

I'm wondering if it's because of the version of the maven wrapper (not maven distribution) in your project folder.
You can take the below action:

  • Regenerate the maven wrapper for your project, e.g. by running mvn -N io.takari:maven:0.7.7:wrapper, see if it works.

@Eskibear Eskibear added the needs more info Further information is requested label Mar 20, 2020
@no-response
Copy link

no-response bot commented Apr 3, 2020

This issue has been closed automatically because it needs more information and has not had recent activity. Please reach out if you have or find the answers we need so that we can investigate further.

@no-response no-response bot closed this as completed Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more info Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants