Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.5:gulp (gulp build) #717

Open
loonyew opened this issue May 3, 2018 · 4 comments

Comments

@loonyew
Copy link

loonyew commented May 3, 2018

i have search through the issue and can't find any solution on the problem i am facing now. Any idea what did i do wrongly. Thank You.

frontend-maven-plugin : 1.5
OS : Windows 8
Eclipse : Version: Oxygen.1 Release (4.7.1)

My configuration as below

      <plugin>
       <groupId>com.github.eirslett</groupId>
         <artifactId>frontend-maven-plugin</artifactId>
         <version>1.5</version>
         <executions>
             <execution>
                 <id>install node and npm</id>
                 <goals>
                     <goal>install-node-and-npm</goal>
                 </goals>
                 <phase>generate-resources</phase>
                 <configuration>
                     <nodeVersion>v9.6.0</nodeVersion>
                     <npmVersion>5.6.0</npmVersion>
                     <nodeDownloadRoot>https://nodejs.org/dist/</nodeDownloadRoot>
  				<npmDownloadRoot>http://registry.npmjs.org/npm/-/</npmDownloadRoot>
                 </configuration>
            </execution>
            <execution>
                 <id>npm install</id>
                 <goals>
                    <goal>npm</goal>
                 </goals>
                 <phase>generate-resources</phase>
            </execution>                
            <execution>
                 <id>gulp build</id>
                 <goals>
                     <goal>gulp</goal>
                 </goals>
                 <phase>generate-resources</phase>
            </execution>
        </executions>
     </plugin>

Error Message
Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.5:gulp (gulp build) on project SAM4.0: Failed to run task: 'gulp ' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]

Failed to run task (com.github.eirslett:frontend-maven-plugin:1.5:gulp:gulp build:generate-resources)

org.apache.maven.plugin.MojoFailureException: Failed to run task
at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute(AbstractFrontendMojo.java:100)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:331)
at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1362)
at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1360)
at org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:52)
at org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:137)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:172)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1$1.call(MavenBuilder.java:115)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:105)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86)
at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:142)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:232)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: com.github.eirslett.maven.plugins.frontend.lib.TaskRunnerException: 'gulp ' failed.
at com.github.eirslett.maven.plugins.frontend.lib.NodeTaskExecutor.execute(NodeTaskExecutor.java:63)
at com.github.eirslett.maven.plugins.frontend.mojo.GulpMojo.execute(GulpMojo.java:64)
at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute(AbstractFrontendMojo.java:94)
... 32 more
Caused by: com.github.eirslett.maven.plugins.frontend.lib.ProcessExecutionException: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at com.github.eirslett.maven.plugins.frontend.lib.ProcessExecutor.execute(ProcessExecutor.java:82)
at com.github.eirslett.maven.plugins.frontend.lib.ProcessExecutor.executeAndRedirectOutput(ProcessExecutor.java:64)
at com.github.eirslett.maven.plugins.frontend.lib.NodeExecutor.executeAndRedirectOutput(NodeExecutor.java:29)
at com.github.eirslett.maven.plugins.frontend.lib.NodeTaskExecutor.execute(NodeTaskExecutor.java:58)
... 34 more
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at com.github.eirslett.maven.plugins.frontend.lib.ProcessExecutor.execute(ProcessExecutor.java:74)
... 37 more

@eirslett
Copy link
Owner

eirslett commented May 4, 2018

Try running gulp directly, without the maven plugin?

@loonyew
Copy link
Author

loonyew commented May 7, 2018

can run gulp directly without problem

@jawadk
Copy link

jawadk commented Nov 27, 2018

how can I run Gulp without Maven?

@joaomarcosribeiroc
Copy link

joaomarcosribeiroc commented Aug 22, 2020

This stacktrace is the one the maven generate when an error occurred when trying to run the specific goal in a defined execution of a specific plugin in a specific phase of the whole build cycle, and wont help that much. The plugin/goal itself generate a more detailed and helpful error message before returning to maven which in turn generate the BUILD FAILURE maven message with the stacktrace. That said, what appear before BUILD FAILURE message?

I faced this:

--- frontend-maven-plugin:1.10.0:gulp (gulp) @ client-side ---
[INFO] testFailureIgnore property is ignored in non test phases
[INFO] Running 'gulp.js ' in /home/joao/Dropbox/projectss/ownsite/client-side/src/main/webapp
[INFO] [15:45:03] Using gulpfile ~/Dropbox/projectss/ownsite/client-side/src/main/webapp/gulpfile.js
[INFO] [15:45:03] Task never defined: default
[INFO] [15:45:03] To list available tasks, try running: gulp --tasks

And solved by adding the <arguments\> tag inside the <configuration> tag of the gulp tag. So, I can presume that if no arguments are specified, maven uses the "default" word that result in: gulp default (i think)
As I didn't define any gulp.task('default', function(){...}) in gulpfile, this is 'never defined task'.

My gulp execution tag

<execution>
          <id>gulp</id>
          <phase>generate-resources</phase>
          <goals>
            <goal>gulp</goal>
          </goals>
          <configuration>
            <environmentVariables>
              <NODE_ENV>production</NODE_ENV>
            </environmentVariables>
            <!-- optional: if not specified, it will run gulp's default
           task (and you can remove this whole <configuration> section.) -->
           <arguments>sass</arguments>
          </configuration>
        </execution>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants