# Using the Frontend Maven Plugin to Run Node and npm Tools in Maven Projects

DevFeed: [Using the Frontend Maven Plugin to Run Node and npm Tools in Maven Projects](<https://devfeed.tech/articles/conquering-the-kingdom-of-java-with-a-nodejs-trojan-horse-31974.md>)

Original publisher: [Read original article](<https://tech.finn.no2013/06/06/conquering-the-kingdom-of-java-with-a-nodejs-trojan-horse/>)

Author: espen

Published: 2013-06-06T07:36:00Z

Content type: tutorial

Language: en

Sources: [Finn.no](<https://devfeed.tech/sources/finn-no.md>)

Topics: [Maven](<https://devfeed.tech/topics/maven.md>), [npm](<https://devfeed.tech/topics/npm.md>), [Java](<https://devfeed.tech/topics/java.md>), [Gulp](<https://devfeed.tech/topics/gulp.md>), [ci](<https://devfeed.tech/topics/ci.md>)

Tags: [ci](<https://devfeed.tech/tags/ci.md>), [gulp](<https://devfeed.tech/tags/gulp.md>), [java](<https://devfeed.tech/tags/java.md>), [maven](<https://devfeed.tech/tags/maven.md>), [npm](<https://devfeed.tech/tags/npm.md>)

## AI overview

FINN.no describes using the Frontend Maven Plugin to install Node and npm in a project folder and run Node-based front-end tools from Maven. This allowed Node build, test, and code-analysis tools to integrate with its existing Maven toolchain without requiring Node installation on every developer or CI machine.

## Source excerpt

Most of FINN.no is built with Java and we've been a Java shop for 6-7 years. With the professionalization of front-end development we saw that the tools available in the Java Web Development ecosystem was preventing us from delivering rapidly and with high quality. The trend was that the tools we used weren't keeping up with the pace set by people creating tools in Node's NPM module ecosystem. When working on pet projects we could use these tools, but in our daily job we were working with second rate tools. This was a frustration for many of us, so we set out to work out how we could utilize Node without having to rewrite all our applications. In the belly of the beast that is Maven We use Maven to build and test all our applications. This includes continuous deployment and quality analysis. Our reporting tools requires projects to be built with Maven in order to work. To introduce Node-based tools for front-end tasks, we had to be able to run them from Maven. The easiest way to get started is just to use the Maven exec plugin. It allows you to run commands like on the command line. This approach worked, but there was one catch: it relied upon Node + NPM to be installed on every developer machine as well as in our CI environment. Forcing 100+ developers to install Node and keep up with versions was something which wasn't really acceptable for the rest of the organization. Enter The Maven Front-end Plugin Behold! The Frontend Maven plugin Erik Sletteberg, who started out working as a summer intern and is now working at FINN.no full time, helped solve the problem of Node having to be installed. He created the Frontend Maven Plugin which install Node+NPM in the project folder. The plugin also has tasks for running NPM, Grunt, Gulp and similar. Because of the tool we were able to use Node within a Maven web application module, which was awesome! It meant we could use build-, test and code analysis tools developed in Node and have them report into our existing tool chain