I'm writing groovy script and trying to execute following shell command using execute() method
"mvn clean install -f \{pom directory}\pom.xml".execute()
but got an error with following message
"Cannot run program "mvn": error=2, No such file or directory"
Of course, maven is already installed and the command works well on terminal....
I also tried with "sc -c" prefix.
"sh -c mvn clean install -f \<pom directory\pom.xml".execute()
But this does execute nothing and no error at all. it seems like the command just ignored.
So how should I execute maven install in groovy script?