Installs and run node, npm or yarn as part of your maven build. The buildfrontend-maven-plugin will do the following steps for you:
Travis (Linux & Mac OS X):
Appveyor (Windows):
Demo projects can be found here.
<build>
<plugins>
<plugin>
<groupId>com.github.sdorra</groupId>
<artifactId>buildfrontend-maven-plugin</artifactId>
<version>2.1.0</version>
<configuration>
<node>
<version>8.11.4</version>
</node>
<pkgManager>
<type>YARN</type>
<version>1.9.4</version>
</pkgManager>
<script>run</script>
</configuration>
<executions>
<execution>
<id>install</id>
<phase>process-resources</phase>
<goals>
<goal>install</goal>
</goals>
</execution>
<execution>
<id>run</id>
<phase>process-resources</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
The project does not longer support steps for each tool (e.g.: bower, npm, karma, ...), version 2.x focuses on the usage of scripts inside the package.json. If you want to run bower or karma just add a script to your package.json and use the run goal.
Version 2.x uses an abstraction for node package manager, so you can decide if you want to use npm or yarn.
The buildfrontend-maven-plugin is heavily inspired from the great work of eirslett. The main differences between both projects is that buildfrontend-maven-plugin installs the downloaded components into the local maven repository before extraction. This gives a better performance during a clean build, because we don't have to download the artifacts again.
This project is licensed under the MIT License - see the LICENSE file for details.