logo Maven Frontend Plugin

This Maven plugin lets you install Node/NPM locally for your project, install dependencies with NPM, install dependencies with bower or jspm, run Grunt or gulp tasks, and/or run Karma tests.

homepage: github.com/eirslett/frontend-maven-plugin
fresh index:
last release: 8 months ago, first release: 8 years ago
packaging: maven-plugin
get this artifact from: central
see this artifact on: search.maven.org


Display vulnerabilities (snyk): Vulnerability check

This chart shows how much is this artifact used as a dependency in other Maven artifacts in Central repository and GitHub:


select version:

Add this snippet into pom.xml inside tag <project><build><plugins>:




Switch to artifact.
goals:
frontend:bower (phase: generate-resources)
frontend:ember (phase: generate-resources)
frontend:grunt (phase: generate-resources)
frontend:gulp (phase: generate-resources)
frontend:install-node-and-npm (phase: generate-resources)
frontend:install-node-and-pnpm (phase: generate-resources)
frontend:install-node-and-yarn (phase: generate-resources)
frontend:jspm (phase: generate-resources)
frontend:karma (phase: test)
frontend:npm (phase: generate-resources)
frontend:npx (phase: generate-resources)
frontend:pnpm (phase: generate-resources)
frontend:webpack (phase: generate-resources)
frontend:yarn (phase: generate-resources)

Often used code snippets:

<plugin>
  <groupId>com.github.eirslett</groupId>
  <artifactId>frontend-maven-plugin</artifactId>
  <version>1.0</version>
  <executions>
    <execution>
      <id>install node and npm</id>
      <phase>generate-resources</phase>
      <goals>
        <goal>install-node-and-npm</goal>
      </goals>
      <configuration>
        <nodeVersion>v4.4.4</nodeVersion>
        <npmVersion>2.15.1</npmVersion>
      </configuration>
    </execution>
    <execution>
      <id>install AVRODOC</id>
      <phase>generate-resources</phase>
      <goals>
        <goal>npm</goal>
      </goals>
      <configuration>
        <arguments>install avrodoc -g</arguments>
      </configuration>
    </execution>
  </executions>
  <configuration>
    <skip>${skip.avrodoc}</skip>
    <installDirectory>${project.basedir}/target</installDirectory>
  </configuration>
</plugin>
<plugin>
  <groupId>com.github.eirslett</groupId>
  <artifactId>frontend-maven-plugin</artifactId>
  <version>1.6</version>
  <executions>
    <execution>
      <id>install node and npm</id>
      <phase>generate-resources</phase>
      <goals>
        <goal>install-node-and-npm</goal>
      </goals>
      <configuration>
        <nodeVersion>v4.4.4</nodeVersion>
        <npmVersion>2.15.1</npmVersion>
      </configuration>
    </execution>
    <execution>
      <id>install AVRODOC</id>
      <phase>generate-resources</phase>
      <goals>
        <goal>npm</goal>
      </goals>
      <configuration>
        <arguments>install avrodoc -g</arguments>
      </configuration>
    </execution>
  </executions>
  <configuration>
    <skip>${skip.avrodoc}</skip>
    <installDirectory>${project.basedir}/target</installDirectory>
  </configuration>
</plugin>
<plugin>
  <groupId>com.github.eirslett</groupId>
  <artifactId>frontend-maven-plugin</artifactId>
  <version>1.2</version>
  <configuration>
    <installDirectory>target</installDirectory>
  </configuration>
  <executions>
    <execution>
      <id>install node and npm</id>
      <goals>
        <goal>install-node-and-npm</goal>
      </goals>
      <configuration>
        <nodeVersion>v4.4.5</nodeVersion>
        <npmVersion>3.9.2</npmVersion>
      </configuration>
    </execution>
    <execution>
      <id>npm install</id>
      <goals>
        <goal>npm</goal>
      </goals>
      <configuration>
        <arguments>install</arguments>
      </configuration>
    </execution>
    <execution>
      <id>webpack build</id>
      <goals>
        <goal>webpack</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>com.github.eirslett</groupId>
  <artifactId>frontend-maven-plugin</artifactId>
  <executions>
    <execution>
      <id>yarn install</id>
      <goals>
        <goal>yarn</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>com.github.eirslett</groupId>
  <artifactId>frontend-maven-plugin</artifactId>
  <version>1.6</version>
  <configuration>
    <installDirectory>target</installDirectory>
  </configuration>
  <executions>
    <execution>
      <id>install node and npm</id>
      <goals>
        <goal>install-node-and-npm</goal>
      </goals>
      <configuration>
        <nodeVersion>v10.11.0</nodeVersion>
        <npmVersion>6.4.1</npmVersion>
      </configuration>
    </execution>
    <execution>
      <id>npm install</id>
      <goals>
        <goal>npm</goal>
      </goals>
      <configuration>
        <arguments>install</arguments>
      </configuration>
    </execution>
    <execution>
      <id>webpack build</id>
      <goals>
        <goal>webpack</goal>
      </goals>
    </execution>
  </executions>
</plugin>

© Jiri Pinkas 2015 - 2022. All rights reserved! Admin login To submit bugs / feature requests please use this github page
related: JavaVids | Top Java Blogs | Java školení
Apache and Apache Maven are trademarks of the Apache Software Foundation. The Central Repository is a service mark of Sonatype, Inc.