eirslett / frontend-maven-plugin

"Maven-node-grunt-gulp-npm-node-plugin to end all maven-node-grunt-gulp-npm-plugins." A Maven plugin that downloads/installs Node and NPM locally, runs NPM install, Grunt, Gulp and/or Karma.
Apache License 2.0
4.25k stars 871 forks source link

Failed to execute goal org.apache.maven.plugins:maven-invoker-plugin:2.0.0:run (default) on project frontend-maven-plugin: 1 build failed. #432

Closed cmackenzie1 closed 8 years ago

cmackenzie1 commented 8 years ago
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD SUCCESS
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 9.733 s
[INFO] [INFO] Finished at: 2016-06-03T08:27:49+00:00
[INFO] [INFO] Final Memory: 11M/989M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] run script verify.groovy
[INFO] Running post-build script: /frontend-maven-plugin/frontend-maven-plugin/target/it/custom-working-directory/verify.groovy
[INFO] Finished post-build script: /frontend-maven-plugin/frontend-maven-plugin/target/it/custom-working-directory/verify.groovy
[INFO] ..SUCCESS (13.1 s)
[INFO] -------------------------------------------------
[INFO] Build Summary:
[INFO]   Passed: 2, Failed: 1, Errors: 0, Skipped: 0
[INFO] -------------------------------------------------
[ERROR] The following builds failed:
[ERROR] *  example project/pom.xml
[INFO] -------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Frontend Plugins ................................... SUCCESS [  4.226 s]
[INFO] frontend-plugin-core ............................... SUCCESS [  6.069 s]
[INFO] Maven Frontend Plugin .............................. FAILURE [02:59 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:09 min
[INFO] Finished at: 2016-06-03T08:27:49+00:00
[INFO] Final Memory: 50M/989M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-invoker-plugin:2.0.0:run (default) on project frontend-maven-plugin: 1 build failed. See console output above for details. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :frontend-maven-plugin
cmackenzie1 commented 8 years ago
root@160b779ddbe0:/nifi# mvn -v
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Apache Maven 3.3.3
Maven home: /usr/share/maven
Java version: 1.8.0_91, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "4.4.8-boot2docker", arch: "amd64", family: "unix"
eirslett commented 8 years ago

What is the log output for the failed test?

cmackenzie1 commented 8 years ago
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:22 min (Wall Clock)
[INFO] Finished at: 2016-06-03T09:06:16+00:00
[INFO] Final Memory: 144M/989M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.0:bower (bower-install) on project nifi-web-ui: Failed to run task: 'bower install --config.directory=/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/target/nifi-web-ui-1.0.0-SNAPSHOT/assets' failed. (error code 1) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.0:bower (bower-install) on project nifi-web-ui: Failed to run task
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
        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.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:189)
        at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:185)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.maven.plugin.MojoFailureException: Failed to run task
        at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute(AbstractFrontendMojo.java:95)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 11 more
Caused by: com.github.eirslett.maven.plugins.frontend.lib.TaskRunnerException: 'bower install --config.directory=/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/target/nifi-web-ui-1.0.0-SNAPSHOT/assets' failed. (error code 1)
        at com.github.eirslett.maven.plugins.frontend.lib.NodeTaskExecutor.execute(NodeTaskExecutor.java:60)
        at com.github.eirslett.maven.plugins.frontend.mojo.BowerMojo.execute(BowerMojo.java:42)
        at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute(AbstractFrontendMojo.java:89)
        ... 13 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :nifi-web-ui
cmackenzie1 commented 8 years ago

Found the solution. You can not run the build process as root (ie. default docker user) due to the NodeJS package bower cowardly refusing to run with elevated privileges

bhagujava commented 6 years ago

I am getting the same issue. Is there any other solution? I am using window 7.

i tried in both way running with admin and normal user. There was no internet connectivity issue.

below are the log.

[INFO] Frontend Plugins ................................... SUCCESS [ 0.374 s] [INFO] frontend-plugin-core ............................... SUCCESS [ 1.354 s] [INFO] Maven Frontend Plugin .............................. FAILURE [08:14 min] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 08:16 min [INFO] Finished at: 2017-12-20T14:51:42-05:00 [INFO] Final Memory: 34M/350M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-invoker-plugin:2.0 .0:run (default) on project frontend-maven-plugin: 1 build failed. See console o utput above for details. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit ch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [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/MojoFailureExc eption [ERROR] [ERROR] After correcting the problems, you can resume the build with the command