I have a com.github.eirslett:frontend-maven-plugin
in my maven
project.
com.github.eirslett
You may not find any example on how to use the frontend-maven-plugin
in Gradle, as it is dedicated to Maven. But you may take a look at the Siouan Frontend Gradle plugin, which is an equivalent solution for Gradle, and allows to (from official website):
Integrate your frontend NPM/Yarn build into Gradle.
The usage and configuration seems close to your Maven configuration. Define the Node/NPM/Yarn version in your build.gradle
file, link the scripts you want to be run depending on the Gradle lifecycle task (clean/assemble/check), and that's all. Below is a typical usage under Gradle 5.4 with NPM, taken from the docs:
// build.gradle
plugins {
id 'org.siouan.frontend' version '1.1.0'
}
frontend {
nodeVersion = '10.15.3'
// See 'scripts' section in your 'package.json file'
cleanScript = 'run clean'
assembleScript = 'run assemble'
checkScript = 'run check'
}
You'll notice:
frontend-maven-plugin
, there's no declaration/configuration to trigger the frontend build with Gradle, as it is already provided out of the box. The download, installation of Node/NPM/Yarn requires no declaration/configuration - except the version numbers, as well as the build tasks. Just provide the NPM/Yarn command line to clean/assemble/check your frontend.6.2.1
. So your initial configuration with 4.2.4
will require to migrate Node.Regards