buildfrontend-maven-plugin

Installs and run node, npm or yarn as part of your maven build

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

com.github.sdorra
ArtifactId

ArtifactId

buildfrontend-maven-plugin
Last Version

Last Version

2.5.0
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

buildfrontend-maven-plugin
Installs and run node, npm or yarn as part of your maven build
Project URL

Project URL

http://sdorra.github.io/buildfrontend-maven-plugin
Source Code Management

Source Code Management

https://github.com/sdorra/buildfrontend-maven-plugin

Download buildfrontend-maven-plugin

How to add to project

<plugin>
    <groupId>com.github.sdorra</groupId>
    <artifactId>buildfrontend-maven-plugin</artifactId>
    <version>2.5.0</version>
</plugin>

Dependencies

compile (9)

Group / Artifact Type Version
org.apache.maven : maven-plugin-api jar 3.1.0
org.apache.maven : maven-artifact jar 3.1.0
org.apache.maven : maven-compat jar 3.1.0
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.2
javax.inject : javax.inject jar 1
com.google.guava : guava jar 16.0.1
org.codehaus.plexus : plexus-archiver jar 2.4.4
org.zeroturnaround : zt-exec jar 1.6
org.glassfish : javax.json jar 1.1.4

provided (1)

Group / Artifact Type Version
org.apache.maven : maven-core jar 3.1.0

test (3)

Group / Artifact Type Version
junit : junit jar 4.12
org.mockito : mockito-core jar 3.1.0
ch.qos.logback : logback-classic jar 1.2.3

Project Modules

There are no modules declared in this project.

buildfrontend-maven-plugin

Quality Gates Coverage Maven Central License: MIT

Installs and run node, npm or yarn as part of your maven build. The buildfrontend-maven-plugin will do the following steps for you:

  • download the specified tools
  • installs them to your local maven repository
  • extract the archives from the local maven repository
  • invoke the tools with the configured parameters

Continuous integration

Travis (Linux & Mac OS X): Build Status

Appveyor (Windows): Build status

Demo

Demo projects can be found here.

Usage

<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>

Differences to version 1.x

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.

Why not eirslett/frontend-maven-plugin?

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.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Versions

Version
2.5.0
2.4.0
2.3.0
2.2.0
2.1.1
2.1.0
2.0.1
1.2.1
1.2.0
1.1.0
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2