build failing with grunt error

Hi, I saw another question that was similar to mine, my build is failing with

Results :

Tests run: 268, Failures: 0, Errors: 0, Skipped: 0

[INFO] --- jacoco-maven-plugin: (report) @ mamute ---
[INFO] --- grunt-maven-plugin:1.4.1:npm (default) @ mamute ---
[INFO] OS Name: Linux
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 28.355s
[INFO] Finished at: Fri Jul 17 13:55:30 EDT 2015
[INFO] Final Memory: 60M/696M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal pl.allegro:grunt-maven-plugin:1.4.1:npm (default) on project mamute: Unable to execute mojo: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal pl.allegro:grunt-maven-plugin:1.4.1:npm (default) on project mamute: Unable to execute mojo
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(
    at org.apache.maven.DefaultMaven.doExecute(
    at org.apache.maven.DefaultMaven.execute(
    at org.apache.maven.cli.MavenCli.execute(
    at org.apache.maven.cli.MavenCli.doMain(
    at org.apache.maven.cli.MavenCli.main(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo
    at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojoImpl(
    at org.twdata.maven.mojoexecutor.MojoExecutor$ExecutionEnvironmentM3.executeMojo(
    at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo(
    at pl.allegro.tdr.gruntmaven.AbstractExecutableMojo.runExecutable(
    at pl.allegro.tdr.gruntmaven.AbstractExecutableMojo.executeInternal(
    at pl.allegro.tdr.gruntmaven.BaseMavenGruntMojo.execute(
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
    ... 19 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Command execution failed.
    at org.codehaus.mojo.exec.ExecMojo.execute(
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(
    at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojoImpl(
    ... 26 more
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
    at org.apache.commons.exec.DefaultExecutor.executeInternal(
    at org.apache.commons.exec.DefaultExecutor.execute(
    at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(
    at org.codehaus.mojo.exec.ExecMojo.execute(

the other question said that grunt needed to be installed, I entered the following as per the readme:

npm install

and that was ok. I also had some mysql errors which I resolved. Here is the pom.xml section:



Have tried running the script, and installing grunt and grunt-cli globally as

sudo npm install -g grunt
sudo npm install -g grunt-cli

There was no message, error or confirmation after the install. Have tried that a number of times. jason

  • Check if you have grunt installed globally.

    Leonardo Wolter   Jul 17th 2015
  • If you're running debian, try installing nodejs-legacy. I ran into the same problem, and it seems to be because grunt relies on there being an executable called "node" while more recent nodejs packages have renamed this executable to "nodejs"

    coyler   Jul 18th 2015
  • SCHWEEET!!!! That did it. Maybe if you post that as an answer, I can set as accepted solution?

    Jason   Jul 18th 2015
  • It would be nice, can you do it @coyler?

    Leonardo Wolter   Jul 18th 2015
  1. You will see these arrows in every question page. They allow you to upvote/downvote according to the relevancy of the question/answer.
  2. Edit your question/answer if you wish to change it or update it.
  3. If you dont understand something about the question, leave a comment asking. The answer field should be only used for answers.
  4. If the author of a question mark an answer as solution, this mark will be visible.
  5. Click here to see more details about the operation of the system!

2 answers

It is not the answer you were looking for? Search other questions with the tags grunt or make your own question.