Edit 20140716:
tl;dr = exec-maven-plugin does not recognise .cmd
files, but only .bat
files, as executable scripts. Rename grunt.cmd --> grunt.bat
, bower.cmd --> bower.bat
, etc. as a workaround.
Having done npm install -g grunt-cli
on my system, grunt
is most certainly on the PATH
When I run maven install
however, this doesn't seem to register.
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
(build-spa-bower) on project foobar: Command execution failed.
Cannot run program "grunt" (in directory "C:\workspace\foobar\src\main\spa"):
CreateProcess error=2, The system cannot find the file specified -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException:
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
(build-spa-bower) on project foobar: Command execution failed.
Just to be sure, in the same terminal, I have executed this
cd C:\workspace\foobar\src\main\spa
grunt build
... in the same terminal as I issued the maven command above, and grunt executes just fine.
Does exec-maven-plugin
use the PATH
environment variable, or does it need to be told that this executable exisst in some other way?
EDIT:
This documentation suggests that executables on PATH
should be found, so it stumps me further.