This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of Machine Learning with R: Expert techniques for predictive modeling and have Brett Lantz on-line!
See this thread for details.
Win a copy of Machine Learning with R: Expert techniques for predictive modeling this week in the Artificial Intelligence and Machine Learning 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

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: 21805
104
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.
 
This cake looks terrible, but it tastes great! Now take a bite out of this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!