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

Could not Perform Maven Update #28585

Closed
kesavan22 opened this issue Jan 29, 2025 · 6 comments · Fixed by #28634
Closed

Could not Perform Maven Update #28585

kesavan22 opened this issue Jan 29, 2025 · 6 comments · Fixed by #28634

Comments

@kesavan22
Copy link

kesavan22 commented Jan 29, 2025

I recently created Jhipster app using generator version 8.7.3, while generating files noticed log Cannot start maven from wrapper. But the files were generated successfully i could see the execution completion log.

Is this anything wrong in my system wondering due to the space between my PC Username?

Please share your thoughts on this.

Thank you.

Image

-----------------*****----------------------

Image

Below is the error occurred on performing maven update, i have checked the .m2 folder dependency was downloaded from central maven repo.

Image

@kesavan22
Copy link
Author

Adding some more observations

Created a new app with the older generator version 7.9.4. I could see the libraries downloading from central repo without error

Image

@atomfrede
Copy link
Member

Can you execute the wrapper directly via cli? Regarding the space, at least I rembemer some issues with spaces (in particular on windows) with node/npm we use to execute the task during generation.

@kesavan22
Copy link
Author

No, I can't execute this via cli, but the downgraded version I can

@mshima
Copy link
Member

mshima commented Feb 5, 2025

@mshima mshima closed this as not planned Won't fix, can't repro, duplicate, stale Feb 5, 2025
@ps10xgit
Copy link
Contributor

ps10xgit commented Feb 6, 2025

In my case, with Maven on Windows, I was also to fix the error by adding quotes around the %MVNW_CMD% in the generated mvnw.cmd.

I changed:
@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*)
to:
@IF NOT "%__MVNW_CMD__%"=="" ("%__MVNW_CMD__%" %*)

Maybe this fix could be applied to the generator template (line 43) https://github.com/jhipster/generator-jhipster/blob/main/generators/maven/templates/mvnw.cmd

@mshima
Copy link
Member

mshima commented Feb 6, 2025

Release is pending: apache/maven-wrapper#152

@ps10xgit can you contribute with a PR?

ps10xgit pushed a commit to ps10xgit/generator-jhipster that referenced this issue Feb 8, 2025
fix could not perform Maven update when the Windows user name contains space. This is based on a fix for maven-wrapper,
see apache/maven-wrapper#152

Fix jhipster#28585
ps10xgit added a commit to ps10xgit/generator-jhipster that referenced this issue Feb 8, 2025
fix could not perform Maven update when the Windows user name contains space. This is based on a fix for maven-wrapper,
see apache/maven-wrapper#152

Fix jhipster#28585
ps10xgit pushed a commit to ps10xgit/generator-jhipster that referenced this issue Feb 8, 2025
fix could not perform Maven update when the Windows user name contains space. This is based on a fix for maven-wrapper,
see apache/maven-wrapper#152

Fix jhipster#28585
@mraible mraible added this to the 8.9.0 milestone Feb 8, 2025
mraible pushed a commit that referenced this issue Feb 8, 2025
fix could not perform Maven update when the Windows user name contains space. This is based on a fix for maven-wrapper,
see apache/maven-wrapper#152

Fix #28585

Co-authored-by: objectsource <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants