running grunt fails with exception

Runing of mvn grunt target fails :

C:\Users\akshay\workspace\mamute_wks\mamute>mvn -e -X grunt:grunt -Dmamute.grunt.task=run

This command is internally executed by GruntRunner.

Exception :

.2
[DEBUG]   Included: junit:junit:jar:3.8.1
[DEBUG]   Included: asm:asm:jar:3.3.1
[DEBUG]   Included: asm:asm-commons:jar:3.3.1
[DEBUG]   Included: asm:asm-tree:jar:3.3.1
[DEBUG]   Included: org.codehaus.plexus:plexus-archiver:jar:2.1.1
[DEBUG]   Included: org.codehaus.plexus:plexus-io:jar:2.0.3
[DEBUG]   Included: com.thoughtworks.qdox:qdox:jar:1.12.1
[DEBUG]   Included: org.twdata.maven:mojo-executor:jar:1.5.2
[DEBUG]   Included: org.apache.maven.plugins:maven-resources-plugin:jar:2.6
[DEBUG]   Included: org.apache.maven.shared:maven-filtering:jar:1.1
[DEBUG]   Included: org.sonatype.plexus:plexus-build-api:jar:0.0.4
[DEBUG]   Included: org.apache.maven.plugins:maven-clean-plugin:jar:2.5
[DEBUG]   Excluded: org.apache.maven:maven-core:jar:3.1.1
[DEBUG]   Excluded: org.apache.maven:maven-model:jar:3.1.1
[DEBUG]   Excluded: org.apache.maven:maven-settings:jar:3.1.1
[DEBUG]   Excluded: org.apache.maven:maven-settings-builder:jar:3.1.1
[DEBUG]   Excluded: org.apache.maven:maven-repository-metadata:jar:3.1.1
[DEBUG]   Excluded: org.apache.maven:maven-artifact:jar:3.1.1
[DEBUG]   Excluded: org.apache.maven:maven-model-builder:jar:3.1.1
[DEBUG]   Excluded: org.apache.maven:maven-aether-provider:jar:3.1.1
[DEBUG]   Excluded: org.eclipse.aether:aether-spi:jar:0.9.0.M2
[DEBUG]   Excluded: org.eclipse.aether:aether-impl:jar:0.9.0.M2
[DEBUG]   Excluded: org.eclipse.aether:aether-api:jar:0.9.0.M2
[DEBUG]   Excluded: org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.0.0.M5
[DEBUG]   Excluded: org.codehaus.plexus:plexus-classworlds:jar:2.5.1
[DEBUG]   Excluded: org.apache.maven:maven-plugin-api:jar:3.1.1
[DEBUG]   Excluded: org.apache.maven:maven-project:jar:2.2.1
[DEBUG]   Excluded: org.apache.maven:maven-profile:jar:2.2.1
[DEBUG]   Excluded: org.apache.maven:maven-artifact-manager:jar:2.2.1
[DEBUG]   Excluded: org.apache.maven:maven-plugin-registry:jar:2.2.1
[DEBUG]   Excluded: org.apache.maven:maven-plugin-descriptor:jar:2.2.1
[DEBUG]   Excluded: org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9
-stable-1
[DEBUG]   Excluded: classworlds:classworlds:jar:1.1-alpha-2
[DEBUG]   Excluded: org.apache.maven:maven-monitor:jar:2.0.6
[DEBUG] Configuring mojo pl.allegro:grunt-maven-plugin:1.4.1:grunt from plugin r
ealm ClassRealm[plugin>pl.allegro:grunt-maven-plugin:1.4.1, parent: sun.misc.Lau
ncher$AppClassLoader@65450f1f]
[DEBUG] Configuring mojo 'pl.allegro:grunt-maven-plugin:1.4.1:grunt' with basic
configurator -->
[DEBUG]   (f) disabled = false
[DEBUG]   (f) execMavenPluginVersion = 1.2.1
[DEBUG]   (f) gruntBuildDirectory = C:\Users\dshetyo\workspace\mamute_wks\mamute
/target-grunt
[DEBUG]   (f) gruntExecutable = node_modules/grunt-cli/bin/grunt
[DEBUG]   (f) gruntOptions = [--verbose]
[DEBUG]   (f) ignoreAllErrors = false
[DEBUG]   (f) ignoreTasksErrors = false
[DEBUG]   (f) jsSourceDirectory = static
[DEBUG]   (f) mavenProject = MavenProject: br.com.caelum:mamute:1.3.1-SNAPSHOT @
 C:\Users\dshetyo\workspace\mamute_wks\mamute\pom.xml
[DEBUG]   (f) mavenSession = org.apache.maven.execution.MavenSession@48f71c86
[DEBUG]   (f) nodeExecutable = node
[DEBUG]   (f) npmOfflineModulesFile = node_modules.tar
[DEBUG]   (f) osName = Windows 7
[DEBUG]   (f) runGruntWithNode = false
[DEBUG]   (f) showColors = false
[DEBUG]   (f) sourceDirectory = src/main/webapp
[DEBUG]   (f) target = run
[DEBUG] -- end configuration --
[INFO] OS Name: Windows 7
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=1, ConflictMark
er.markTime=0, ConflictMarker.nodeCount=68, ConflictIdSorter.graphTime=1, Confli
ctIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=25, ConflictIdSorter.
conflictIdCycleCount=0, ConflictResolver.totalTime=7, ConflictResolver.conflictI
temCount=65, DefaultDependencyCollector.collectTime=45, DefaultDependencyCollect
or.transformTime=9}
[DEBUG] org.codehaus.mojo:exec-maven-plugin:jar:1.2.1:
[DEBUG]    org.apache.maven:maven-toolchain:jar:1.0:compile
[DEBUG]    org.apache.maven:maven-project:jar:2.0.6:compile
[DEBUG]       org.apache.maven:maven-settings:jar:2.0.6:compile
[DEBUG]       org.apache.maven:maven-profile:jar:2.0.6:compile
[DEBUG]       org.apache.maven:maven-plugin-registry:jar:2.0.6:compile
[DEBUG]    org.apache.maven:maven-model:jar:2.0.6:compile
[DEBUG]    org.apache.maven:maven-artifact:jar:2.0.6:compile
[DEBUG]    org.apache.maven:maven-artifact-manager:jar:2.0.6:compile
[DEBUG]       org.apache.maven:maven-repository-metadata:jar:2.0.6:compile
[DEBUG]    org.apache.maven:maven-core:jar:2.0.6:compile
[DEBUG]       org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.6:compi
le
[DEBUG]       org.apache.maven.reporting:maven-reporting-api:jar:2.0.6:compile
[DEBUG]          org.apache.maven.doxia:doxia-sink-api:jar:1.0-alpha-7:compile
[DEBUG]       org.apache.maven:maven-error-diagnostics:jar:2.0.6:compile
[DEBUG]       commons-cli:commons-cli:jar:1.0:compile
[DEBUG]       org.apache.maven:maven-plugin-descriptor:jar:2.0.6:compile
[DEBUG]       org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4:compi
le
[DEBUG]       org.apache.maven:maven-monitor:jar:2.0.6:compile
[DEBUG]       classworlds:classworlds:jar:1.1:compile
[DEBUG]    org.apache.maven:maven-plugin-api:jar:2.0.6:compile
[DEBUG]    org.codehaus.plexus:plexus-utils:jar:2.0.5:compile
[DEBUG]    org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9:compile
[DEBUG]       junit:junit:jar:3.8.2:test
[DEBUG]    org.apache.commons:commons-exec:jar:1.1:compile
[DEBUG] Created new class realm plugin>org.codehaus.mojo:exec-maven-plugin:1.2.1

[DEBUG] Importing foreign packages into class realm plugin>org.codehaus.mojo:exe
c-maven-plugin:1.2.1
[DEBUG]   Imported:  < maven.api
[DEBUG] Populating class realm plugin>org.codehaus.mojo:exec-maven-plugin:1.2.1
[DEBUG]   Included: org.codehaus.mojo:exec-maven-plugin:jar:1.2.1
[DEBUG]   Included: org.apache.maven.reporting:maven-reporting-api:jar:2.0.6
[DEBUG]   Included: org.apache.maven.doxia:doxia-sink-api:jar:1.0-alpha-7
[DEBUG]   Included: commons-cli:commons-cli:jar:1.0
[DEBUG]   Included: org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4

[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:2.0.5
[DEBUG]   Included: org.apache.commons:commons-exec:jar:1.1
[DEBUG]   Excluded: org.apache.maven:maven-toolchain:jar:1.0
[DEBUG]   Excluded: org.apache.maven:maven-project:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-settings:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-profile:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-plugin-registry:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-model:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-artifact:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-artifact-manager:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-repository-metadata:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-core:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.6

[DEBUG]   Excluded: org.apache.maven:maven-error-diagnostics:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-plugin-descriptor:jar:2.0.6
[DEBUG]   Excluded: org.apache.maven:maven-monitor:jar:2.0.6
[DEBUG]   Excluded: classworlds:classworlds:jar:1.1
[DEBUG]   Excluded: org.apache.maven:maven-plugin-api:jar:2.0.6
[DEBUG]   Excluded: org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9

[DEBUG]   Excluded: junit:junit:jar:3.8.2
[DEBUG] Configuring mojo org.codehaus.mojo:exec-maven-plugin:1.2.1:exec from plu
gin realm ClassRealm[plugin>org.codehaus.mojo:exec-maven-plugin:1.2.1, parent: s
un.misc.Launcher$AppClassLoader@65450f1f]
[DEBUG] Configuring mojo 'org.codehaus.mojo:exec-maven-plugin:1.2.1:exec' with b
asic configurator -->
[DEBUG]   (f) executable = cmd
[DEBUG]   (f) arguments = [/C, node_modules/grunt-cli/bin/grunt, run, --no-color
, --verbose]
[DEBUG]   (f) workingDirectory = C:\Users\dshetyo\workspace\mamute_wks\mamute\ta
rget-grunt
[DEBUG]   (f) basedir = C:\Users\dshetyo\workspace\mamute_wks\mamute
[DEBUG]   (f) classpathScope = runtime
[DEBUG]   (f) longClasspath = false
[DEBUG]   (f) project = MavenProject: br.com.caelum:mamute:1.3.1-SNAPSHOT @ C:\U
sers\dshetyo\workspace\mamute_wks\mamute\pom.xml
[DEBUG]   (f) session = org.apache.maven.execution.MavenSession@48f71c86
[DEBUG]   (f) skip = false
[DEBUG] -- end configuration --
[DEBUG] Executing command line: cmd /C node_modules/grunt-cli/bin/grunt run --no
-color --verbose
'node_modules' is not recognized as an internal or external command,
operable program or batch file.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.077 s
[INFO] Finished at: 2015-01-17T15:44:52+05:30
[INFO] Final Memory: 11M/216M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal pl.allegro:grunt-maven-plugin:1.4.1:grunt (defaul
t-cli) on project mamute: Unable to execute mojo: Command execution failed. Proc
ess exited with an error: 1 (Exit value: 1) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal p
l.allegro:grunt-maven-plugin:1.4.1:grunt (default-cli) on project mamute: Unable
 to execute mojo
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:216)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThre
adedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:120)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to execute moj
o
        at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojoImpl(MojoExecut
or.java:174)
        at org.twdata.maven.mojoexecutor.MojoExecutor$ExecutionEnvironmentM3.exe
cuteMojo(MojoExecutor.java:476)
        at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo(MojoExecutor.j
ava:75)
        at pl.allegro.tdr.gruntmaven.AbstractExecutableMojo.runExecutable(Abstra
ctExecutableMojo.java:97)
        at pl.allegro.tdr.gruntmaven.AbstractExecutableMojo.executeInternal(Abst
ractExecutableMojo.java:86)
        at pl.allegro.tdr.gruntmaven.BaseMavenGruntMojo.execute(BaseMavenGruntMo
jo.java:93)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:132)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:208)
        ... 19 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Command execution fai
led.
        at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:362)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:132)
        at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojoImpl(MojoExecut
or.java:172)
        ... 26 more
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an erro
r: 1 (Exit value: 1)
        at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecut
or.java:377)
        at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:
160)
        at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:610)

        at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:352)
        ... 28 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception
C:\Users\akshay\workspace\mamute_wks\mamute>

I didnot install explicitly.I can see following in my pom.xml

<plugin>
                <groupId>pl.allegro</groupId>
                <artifactId>grunt-maven-plugin</artifactId>
                <version>1.4.1</version>
                <configuration>
                    <gruntExecutable>node_modules/grunt-cli/bin/grunt</gruntExecutable>
                    <gruntOptions>
                        <gruntOption>--verbose</gruntOption>
                    </gruntOptions>
                    <target>${mamute.grunt.task}</target>
                </configuration>
                <executions>
                    <execution>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>npm</goal>
                            <goal>grunt</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
  • which version of grunt and mvn are you using?

    Leonardo Wolter   Jan 17th 2015
  • @Leonardo : i just added the details of grunt in my post edit. Looking forward to ur help .I want to start contributing to mamute project asap

    Akshay Shetye   Jan 18th 2015
  • It very difficult to set up mamute dev environemnt on windows .Looking forward for ur help

    Akshay Shetye   Jan 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!

1 answer

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