Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (npm-install) on project.

 
Greenhorn
Posts: 10
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Enterprise multi-module project built on the pipeline. I have Main POM and Child POM. The child POM is where the node modules are built. I am getting error on the pipeline:

Build Failure Error: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (npm-install) on project.

Local build is successful and I am able to generate the war file. I can't post POM as I have restricted access to Internet.
 
Sheriff
Posts: 21954
106
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Doesn't the console show more information about the error? Because probably, for whatever reason, npm install simply fails. It should show why.

To be honest, I'm not a big fan of the exec maven plugin, especially to run commands that need to be installed with a correct version. If an alternative is available, I'd try that instead. Good news: to run npm there is a good alternative: https://github.com/eirslett/frontend-maven-plugin. This downloads a node and npm to your local workspace (which you'd need exclude from your SCM, e.g. using .gitignore), which is then executed. That means that you'll always have the correct (and same!) version - the one you specify in your pom.
 
Those are the largest trousers in the world! Especially when next to this ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic