Skip to content
karlvr edited this page Nov 24, 2014 · 16 revisions

Welcome to the frontend-maven-plugin wiki!

This wiki should be open for everyone to post examples and documentation. It may not be as updated as the README file which serves as the core documentation.

Configuration

Each plugin goal has different configuration options.

install-node-and-npm

  • nodeVersion - the version of node to install
  • npmVersion - the version of npm to install
  • downloadRoot (optional) - where to download node and npm from, defaults to http://nodejs.org/dist/

npm

  • arguments - the arguments to pass to npm, defaults to install.

grunt & gulp

  • arguments - the arguments to pass to grunt or gulp, e.g. build
  • srcdir (optional, for M2Eclipse integration) - a directory to check for changed files before executing in an incremental build
  • triggerfiles (optional, for M2Eclipse integration) - a list of files to check for changes before executing in an incremental build
  • outputdir (optional, for M2Eclipse integration) - a directory to refresh when the build completes, so Eclipse sees changed files

The changed file checking only occurs during an incremental build when using M2Eclipse. In any other environment those options are ignored and builds are always run.

Example:

<configuration>
  <srcdir>${basedir}/src/main/frontend</srcdir>
  <outputdir>${project.build.directory}/frontend</outputdir>
  <triggerfiles>
    <triggerfile>gulpfile.js</triggerfile>
    <triggerfile>package.json</triggerfile>
  </triggerfiles>
</configuration>

karma

  • karmaConfPath - the path to the karma configuration file, defaults to karma.conf.js

Blogs mentioning this plugin

  1. http://wicketinaction.com/2014/07/build-resources-with-node.js/ - describes how to use frontend-maven-plugin for building, watching and live reloading Less and JavaScript resources in Apache Wicket application

  2. http://supposed.nl/2014/06/02/integrate-gulp-and-grunt-into-your-maven-build.html - Integrate Gulp And Grunt Into Your Maven Build

Clone this wiki locally