Problem running mvn clean install from idea for a specific pom.xml

I'm trying to setup an external tool running command mvn clean install in a directory where some pom.xml file exists.
Current settings for tool are:
Program: mvn
Parameters: clean install
Working directory: $ModuleFileDir$

But when i try to start it idea shows an error (path was replaced from the real one, hope it would not confuse anyone :) )
Error running maven: Cannot run program "mvn" (in directory "$homedir/$workdir/$projectdir"): error=2, No such file or directory
BUT, if i select the very same path from error window in idea and run a cd command from linux terminal, it correctly switches me to the specified path where i can run mvn clean install smoothly.

Would u please suggets me some ways to get this fixied or any other ways to run mvn clean install from currently selected or opened pom.xml in project structure window?

Thx in advance.

3 comments

Hello.

As a workaround please change "mvn" program name to "mvn.bat". It helps to me.

Seems that IDEA cannot instatiate a process if a bat file is referred this way. I will create or find a bugreport about that.

Regards,
Alexander.

0

I'd like to remember about another fact. I'm using linux system, not windows.

BUT, if i select the very same path from error window in idea and run a cd command from linux terminal, it correctly switches me to the specified path where i can run mvn clean install smoothly.

0

Tried on linux, could not reproduce.

Does your path to mvn script and/or to module directory includes a symlink?

Thanks,
Alexander.

0

Please sign in to leave a comment.