简体   繁体   English

bash:mvn:找不到命令

[英]bash: mvn: command not found

I've been trying to solve this for quite a while now, but nothing seems to work.我已经尝试解决这个问题已经有一段时间了,但似乎没有任何效果。

I need to run "mvn clean deploy -P release" from the Terminal in IntelliJ (on Mac).我需要从 IntelliJ 的终端(在 Mac 上)运行“mvn clean deploy -P release”。 But it keeps giving me the same error.但它一直给我同样的错误。

bash: mvn: command not found

I was able to run this command about 2 hours ago, but after closing and reopening IntelliJ, I am no longer able to run this command from the Terminal in IntelliJ.大约 2 小时前我能够运行此命令,但在关闭并重新打开 IntelliJ 后,我不再能够从 IntelliJ 的终端运行此命令。

Does anyone know why this happens and how I can fix this?有谁知道为什么会发生这种情况以及我该如何解决?

I figured it out: you have to press CMD + ENTER in IntelliJ for the command to work.我想通了:您必须在 IntelliJ 中按 CMD + ENTER 才能使命令起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM