{"id":13724767,"url":"https://github.com/eirslett/frontend-maven-plugin","last_synced_at":"2025-05-12T05:32:42.444Z","repository":{"id":10351361,"uuid":"12488647","full_name":"eirslett/frontend-maven-plugin","owner":"eirslett","description":"\"Maven-node-grunt-gulp-npm-node-plugin to end all maven-node-grunt-gulp-npm-plugins.\" A Maven plugin that downloads/installs Node and NPM locally, runs NPM install, Grunt, Gulp and/or Karma.","archived":false,"fork":false,"pushed_at":"2025-01-17T12:54:44.000Z","size":2198,"stargazers_count":4292,"open_issues_count":350,"forks_count":877,"subscribers_count":121,"default_branch":"master","last_synced_at":"2025-05-09T03:55:50.000Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eirslett.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-08-30T14:44:38.000Z","updated_at":"2025-05-07T09:37:53.000Z","dependencies_parsed_at":"2022-07-10T14:32:39.925Z","dependency_job_id":"78c0c69d-d9c2-455b-a316-5770cd93d67a","html_url":"https://github.com/eirslett/frontend-maven-plugin","commit_stats":null,"previous_names":[],"tags_count":66,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eirslett%2Ffrontend-maven-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eirslett%2Ffrontend-maven-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eirslett%2Ffrontend-maven-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eirslett%2Ffrontend-maven-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eirslett","download_url":"https://codeload.github.com/eirslett/frontend-maven-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253510465,"owners_count":21919706,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T01:02:03.151Z","updated_at":"2025-05-11T03:24:45.362Z","avatar_url":"https://github.com/eirslett.png","language":"Java","funding_links":[],"categories":["VI. Program languages and applications that were written with Java","Uncategorized","Java"],"sub_categories":["3. Javascript","Uncategorized"],"readme":"# frontend-maven-plugin\n\n[![Build Status OSX and Linux](https://travis-ci.org/eirslett/frontend-maven-plugin.png?branch=master)](https://travis-ci.org/eirslett/frontend-maven-plugin)\n[![Build status Windows](https://ci.appveyor.com/api/projects/status/vxbccc1t9ceadhi9?svg=true)](https://ci.appveyor.com/project/eirslett/frontend-maven-plugin)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.eirslett/frontend-maven-plugin/badge.svg?style=flat)](https://maven-badges.herokuapp.com/maven-central/com.github.eirslett/frontend-maven-plugin/)\n\nThis plugin downloads/installs Node and NPM locally for your project, runs `npm install`, and then any combination of \n[Bower](http://bower.io/), [Grunt](http://gruntjs.com/), [Gulp](http://gulpjs.com/), [Jspm](http://jspm.io), \n[Karma](http://karma-runner.github.io/), or [Webpack](http://webpack.github.io/).\nIt's supposed to work on Windows, OS X and Linux.\n\nIf you prefer [Yarn](https://yarnpkg.com/) over [NPM](https://www.npmjs.com/) for your node package fetching, \nthis plugin can also download Node and Yarn and then run `yarn install` for your project.\n\n#### What is this plugin meant to do?\n- Let you keep your frontend and backend builds as separate as possible, by\nreducing the amount of interaction between them to the bare minimum; using only 1 plugin.\n- Let you use Node.js and its libraries in your build process without installing Node/NPM\nglobally for your build system\n- Let you ensure that the version of Node and NPM being run is the same in every build environment\n\n#### What is this plugin not meant to do?\n- Not meant to replace the developer version of Node - frontend developers will still install Node on their\nlaptops, but backend developers can run a clean build without even installing Node on their computer.\n- Not meant to install Node for production uses. The Node usage is intended as part of a frontend build,\nrunning common javascript tasks such as minification, obfuscation, compression, packaging, testing etc.\n\n**Notice:** _This plugin does not support already installed Node or npm versions. Use the `exec-maven-plugin` instead._\n\n## Requirements\n\n* _Maven 3.6_ and _Java 1.8_\n* For _Maven 2_ support take a look at the [wiki](https://github.com/eirslett/frontend-maven-plugin/wiki#maven-2).\n\n## Installation\n\nInclude the plugin as a dependency in your Maven project. Change `LATEST_VERSION` to the latest tagged version.\n\n```xml\n\u003cplugins\u003e\n    \u003cplugin\u003e\n        \u003cgroupId\u003ecom.github.eirslett\u003c/groupId\u003e\n        \u003cartifactId\u003efrontend-maven-plugin\u003c/artifactId\u003e\n        \u003c!-- Use the latest released version:\n        https://repo1.maven.org/maven2/com/github/eirslett/frontend-maven-plugin/ --\u003e\n        \u003cversion\u003eLATEST_VERSION\u003c/version\u003e\n        ...\n    \u003c/plugin\u003e\n...\n```\n\n## Usage\n\nHave a look at the [example project](frontend-maven-plugin/src/it/example%20project),\nto see how it should be set up: https://github.com/eirslett/frontend-maven-plugin/blob/master/frontend-maven-plugin/src/it/example%20project/pom.xml\n\n- [frontend-maven-plugin](#frontend-maven-plugin)\n      - [What is this plugin meant to do?](#what-is-this-plugin-meant-to-do)\n      - [What is this plugin not meant to do?](#what-is-this-plugin-not-meant-to-do)\n  - [Requirements](#requirements)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [Installing node and npm](#installing-node-and-npm)\n    - [Installing node and yarn](#installing-node-and-yarn)\n    - [Installing node and corepack](#installing-node-and-corepack)\n    - [Installing bun](#installing-bun)\n    - [Running npm](#running-npm)\n      - [npx](#npx)\n    - [Running yarn](#running-yarn)\n      - [Yarn with Private Registry](#yarn-with-private-registry)\n    - [Running corepack](#running-corepack)\n    - [Running bower](#running-bower)\n    - [Running Grunt](#running-grunt)\n    - [Running gulp](#running-gulp)\n    - [Running jspm](#running-jspm)\n    - [Running Karma](#running-karma)\n    - [Running Webpack](#running-webpack)\n    - [Running bun](#running-bun)\n    - [Optional Configuration](#optional-configuration)\n      - [Working directory](#working-directory)\n      - [Installation Directory](#installation-directory)\n      - [Proxy settings](#proxy-settings)\n      - [Environment variables](#environment-variables)\n      - [Ignoring Failure](#ignoring-failure)\n      - [Skipping Execution](#skipping-execution)\n  - [Eclipse M2E support](#eclipse-m2e-support)\n  - [Helper scripts](#helper-scripts)\n  - [To build this project:](#to-build-this-project)\n  - [Issues, Contributing](#issues-contributing)\n  - [License](#license)\n    \n**Recommendation:** _Try to run all your tasks via npm scripts instead of running bower, grunt, gulp etc. directly._\n\n### Installing node and npm\n\nThe versions of Node and npm are downloaded from https://nodejs.org/dist, extracted and put into a `node` folder created \nin your [installation directory](#installation-directory) . Node/npm will only be \"installed\" locally to your project. \nIt will not be installed globally on the whole system (and it will not interfere with any Node/npm installations already \npresent). \n\n```xml\n\u003cplugin\u003e\n    ...\n    \u003cexecutions\u003e\n        \u003cexecution\u003e\n            \u003c!-- optional: you don't really need execution ids, but it looks nice in your build log. --\u003e\n            \u003cid\u003einstall node and npm\u003c/id\u003e\n            \u003cgoals\u003e\n                \u003cgoal\u003einstall-node-and-npm\u003c/goal\u003e\n            \u003c/goals\u003e\n            \u003c!-- optional: default phase is \"generate-resources\" --\u003e\n            \u003cphase\u003egenerate-resources\u003c/phase\u003e\n        \u003c/execution\u003e\n    \u003c/executions\u003e\n    \u003cconfiguration\u003e\n        \u003cnodeVersion\u003ev4.6.0\u003c/nodeVersion\u003e\n\n        \u003c!-- optional: with node version greater than 4.0.0 will use npm provided by node distribution --\u003e\n        \u003cnpmVersion\u003e2.15.9\u003c/npmVersion\u003e\n        \n        \u003c!-- optional: where to download node and npm from. Defaults to https://nodejs.org/dist/ --\u003e\n        \u003cdownloadRoot\u003ehttp://myproxy.example.org/nodejs/\u003c/downloadRoot\u003e\n    \u003c/configuration\u003e\n\u003c/plugin\u003e\n```\n\nYou can also specify separate download roots for npm and node as they are stored in separate repos. In case the root configured requires authentication, you can specify a server ID from your maven settings file:\n\n```xml\n\u003cplugin\u003e\n    ...\n    \u003cconfiguration\u003e\n        \u003c!-- optional: where to download node from. Defaults to https://nodejs.org/dist/ --\u003e\n        \u003cnodeDownloadRoot\u003ehttp://myproxy.example.org/nodejs/\u003c/nodeDownloadRoot\u003e\n\t\u003c!-- optional: credentials to use from Maven settings to download node --\u003e\n        \u003cserverId\u003eserver001\u003c/serverId\u003e\n        \u003c!-- optional: where to download npm from. Defaults to https://registry.npmjs.org/npm/-/ --\u003e\n        \u003cnpmDownloadRoot\u003ehttps://myproxy.example.org/npm/\u003c/npmDownloadRoot\u003e\n    \u003c/configuration\u003e\n\u003c/plugin\u003e\n```\n\nYou can use Nexus repository Manager to proxy npm registries. See https://help.sonatype.com/display/NXRM3/Npm+Registry\n\n**Notice:** _Remember to gitignore the `node` folder, unless you actually want to commit it._\n\n### Installing node and yarn\n\nInstead of using Node with npm you can alternatively choose to install Node with Yarn as the package manager.\n\nThe versions of Node and Yarn are downloaded from `https://nodejs.org/dist` for Node \nand from the Github releases for Yarn, \nextracted and put into a `node` folder created in your installation directory. \nNode/Yarn will only be \"installed\" locally to your project. \nIt will not be installed globally on the whole system (and it will not interfere with any Node/Yarn installations already \npresent). \n\nIf your project is using Yarn Berry (2.x or above), the Yarn version is handled per project but a Yarn 1.x install is still needed as a \"bootstrap\".\nThe plugin will try to detect `.yarnrc.yml` file in the current Maven project/module folder, at the root of the multi-module project if relevant, and in the folder from which the `mvn` command was run. \nIf detected, the plugin will assume your project is using Yarn Berry. It will install the 1.x Yarn version you specify with `yarnVersion` as bootstrap, then hand over to your project-specific version.   \n\nHave a look at the example `POM` to see how it should be set up with Yarn: \nhttps://github.com/eirslett/frontend-maven-plugin/blob/master/frontend-maven-plugin/src/it/yarn-integration/pom.xml\n\n\n```xml\n\u003cplugin\u003e\n    ...\n    \u003cexecution\u003e\n        \u003c!-- optional: you don't really need execution ids, but it looks nice in your build log. --\u003e\n        \u003cid\u003einstall node and yarn\u003c/id\u003e\n        \u003cgoals\u003e\n            \u003cgoal\u003einstall-node-and-yarn\u003c/goal\u003e\n        \u003c/goals\u003e\n        \u003c!-- optional: default phase is \"generate-resources\" --\u003e\n        \u003cphase\u003egenerate-resources\u003c/phase\u003e\n    \u003c/execution\u003e\n    \u003cconfiguration\u003e\n        \u003cnodeVersion\u003ev6.9.1\u003c/nodeVersion\u003e\n        \u003cyarnVersion\u003ev0.16.1\u003c/yarnVersion\u003e\n\n        \u003c!-- optional: where to download node from. Defaults to https://nodejs.org/dist/ --\u003e\n        \u003cnodeDownloadRoot\u003ehttp://myproxy.example.org/nodejs/\u003c/nodeDownloadRoot\u003e\n        \u003c!-- optional: where to download yarn from. Defaults to https://github.com/yarnpkg/yarn/releases/download/ --\u003e\n        \u003cyarnDownloadRoot\u003ehttp://myproxy.example.org/yarn/\u003c/yarnDownloadRoot\u003e        \n    \u003c/configuration\u003e\n\u003c/plugin\u003e\n```\n\n### Installing node and corepack\n\nYou can choose to let corepack manage the package manager version in use. Node is\ndownloaded from `https://nodejs.org/dist`, and corepack either comes provided with\nNode, or will currently be downloaded from `https://repository.npmjs.org`, extracted\nand put into a `node` folder created in your installation directory.\n\nNode/corepack and any package managers will only be \"installed\" locally to your project.\nIt will not be installed globally on the whole system (and it will not interfere with any\nNode/corepack installations already present).\n\nHave a look at the example `POM` to see how it should be set up with corepack:\nhttps://github.com/eirslett/frontend-maven-plugin/blob/master/frontend-maven-plugin/src/it/corepack-provided-integration/pom.xml\nor\nhttps://github.com/eirslett/frontend-maven-plugin/blob/master/frontend-maven-plugin/src/it/corepack-integration/pom.xml\nif you need to override the version of corepack in use.\n\n\n```xml\n\u003cplugin\u003e\n    ...\n    \u003cexecution\u003e\n        \u003c!-- optional: you don't really need execution ids, but it looks nice in your build log. --\u003e\n        \u003cid\u003einstall-node-and-corepack\u003c/id\u003e\n        \u003cgoals\u003e\n            \u003cgoal\u003einstall-node-and-corepack\u003c/goal\u003e\n        \u003c/goals\u003e\n        \u003c!-- optional: default phase is \"generate-resources\" --\u003e\n        \u003cphase\u003egenerate-resources\u003c/phase\u003e\n    \u003c/execution\u003e\n    \u003cconfiguration\u003e\n        \u003cnodeVersion\u003ev20.12.2\u003c/nodeVersion\u003e\n\n        \u003c!-- Optional - only needed if Node \u003c16.9, or if you need to use a version different\n             from the one packaged with Node --\u003e\n        \u003ccorepackVersion\u003ev0.25.2\u003c/corepackVersion\u003e\n\n        \u003c!-- optional: where to download node from. Defaults to https://nodejs.org/dist/ --\u003e\n        \u003cnodeDownloadRoot\u003ehttp://myproxy.example.org/nodejs/\u003c/nodeDownloadRoot\u003e\n        \u003c!-- optional: where to download corepack from. Defaults to https://registry.npmjs.org/corepack/-/ --\u003e\n        \u003ccorepackDownloadRoot\u003ehttp://myproxy.example.org/corepack/\u003c/corepackDownloadRoot\u003e\n    \u003c/configuration\u003e\n\u003c/plugin\u003e\n```\n\n### Installing bun\n\nThe version Bun is downloaded from https://github.com/oven-sh/bun/releases/download/, extracted and put into a `bun` folder created \nin your [installation directory](#installation-directory) . Bun will only be \"installed\" locally to your project. \nIt will not be installed globally on the whole system (and it will not interfere with any Bun installations already \npresent). \n\n```xml\n\u003cplugin\u003e\n    ...\n    \u003cexecutions\u003e\n        \u003cexecution\u003e\n            \u003c!-- optional: you don't really need execution ids, but it looks nice in your build log. --\u003e\n            \u003cid\u003einstall bun\u003c/id\u003e\n            \u003cgoals\u003e\n                \u003cgoal\u003einstall-bun\u003c/goal\u003e\n            \u003c/goals\u003e\n            \u003c!-- optional: default phase is \"generate-resources\" --\u003e\n            \u003cphase\u003egenerate-resources\u003c/phase\u003e\n        \u003c/execution\u003e\n    \u003c/executions\u003e\n    \u003cconfiguration\u003e\n        \u003c!-- The version of Bun to install. IMPORTANT! Most Bun version names start with 'v', for example --\u003e\n        \u003cbunVersion\u003ev1.1.34\u003c/bunVersion\u003e\n    \u003c/configuration\u003e\n\u003c/plugin\u003e\n```\n\n### Running npm\n\nAll node packaged modules will be installed in the `node_modules` folder in your [working directory](#working-directory).\nBy default, colors will be shown in the log.\n\n```xml\n\u003cexecution\u003e\n    \u003cid\u003enpm install\u003c/id\u003e\n    \u003cgoals\u003e\n        \u003cgoal\u003enpm\u003c/goal\u003e\n    \u003c/goals\u003e\n\n    \u003c!-- optional: default phase is \"generate-resources\" --\u003e\n    \u003cphase\u003egenerate-resources\u003c/phase\u003e\n\n    \u003cconfiguration\u003e\n        \u003c!-- optional: The default argument is actually\n        \"install\", so unless you need to run some other npm command,\n        you can remove this whole \u003cconfiguration\u003e section.\n        --\u003e\n        \u003carguments\u003einstall\u003c/arguments\u003e\n    \u003c/configuration\u003e\n\u003c/execution\u003e\n```\n\n**Notice:** _Remember to gitignore the `node_modules` folder, unless you actually want to commit it. Npm packages will \nalways be installed in `node_modules` next to your `package.json`, which is default npm behavior._\n\n#### npx\n\nYou can also use [`npx` command](https://blog.npmjs.org/post/162869356040/introducing-npx-an-npm-package-runner), enabling you to execute the CLI of installed packages without a run-script, or even packages that aren't installed at all.\n\n```xml\n\u003cexecution\u003e\n    \u003cid\u003esay hello\u003c/id\u003e\n    \u003cgoals\u003e\n        \u003cgoal\u003enpx\u003c/goal\u003e\n    \u003c/goals\u003e\n\n    \u003cphase\u003egenerate-resources\u003c/phase\u003e\n\n    \u003cconfiguration\u003e\n        \u003carguments\u003ecowsay hello\u003c/arguments\u003e\n    \u003c/configuration\u003e\n\u003c/execution\u003e\n```\n\n### Running yarn\n\nAs with npm above, all node packaged modules will be installed in the `node_modules` folder in your [working directory](#working-directory).\n\n```xml\n\u003cexecution\u003e\n    \u003cid\u003eyarn install\u003c/id\u003e\n    \u003cgoals\u003e\n        \u003cgoal\u003eyarn\u003c/goal\u003e\n    \u003c/goals\u003e\n    \u003cconfiguration\u003e\n         \u003c!-- optional: The default argument is actually\n         \"install\", so unless you need to run some other yarn command,\n         you can remove this whole \u003cconfiguration\u003e section.\n         --\u003e\n        \u003carguments\u003einstall\u003c/arguments\u003e\n    \u003c/configuration\u003e\n\u003c/execution\u003e\n```\n\n#### Yarn with Private Registry\n\nNOTE: if you have a private npm registry that mirrors the npm registry, be aware that yarn.lock\nincludes URLs to the npmjs.org module registry and yarn install will use these paths when installing modules.\n\nIf you want yarn.lock to use your private npm registry, be sure to run these commands on your local machine before you generate yarn.lock:\n```\nyarn config set registry \u003cyour_registry_url\u003e\nyarn install\n```\nThis will create URLs in your yarn.lock file that reference your private npm registry.\n\nAnother way to set a registry is to add a .npmrc file in your project's root directory that contains:\n```\nregistry=\u003cyour_registry_url\u003e\n```\n\nAlso you can set a registry using a tag `npmRegistryURL`\n```\n\u003cexecution\u003e\n    \u003cid\u003eyarn install\u003c/id\u003e\n    \u003cgoals\u003e\n        \u003cgoal\u003eyarn\u003c/goal\u003e\n    \u003c/goals\u003e\n    \u003cconfiguration\u003e\n         \u003c!-- optional: The default argument is actually\n         \"install\", so unless you need to run some other yarn command,\n         you can remove this whole \u003cconfiguration\u003e section.\n         --\u003e\n        \u003carguments\u003einstall\u003c/arguments\u003e\n\t\u003c!-- optional: where to download npm modules from. Defaults to https://registry.yarnpkg.com/ --\u003e\n\t\u003cnpmRegistryURL\u003ehttp://myregistry.example.org/\u003c/npmRegistryURL\u003e\n    \u003c/configuration\u003e\n\u003c/execution\u003e\n```\n\n### Running corepack\n\nIf your `packageManager` specifies `yarn`, then you'll want to have something like:\n\n\n```xml\n\u003cexecution\u003e\n    \u003cid\u003einstall\u003c/id\u003e\n    \u003cgoals\u003e\n        \u003cgoal\u003ecorepack\u003c/goal\u003e\n    \u003c/goals\u003e\n    \u003cconfiguration\u003e\n        \u003carguments\u003eyarn install\u003c/arguments\u003e\n    \u003c/configuration\u003e\n\u003c/execution\u003e\n\u003cexecution\u003e\n    \u003cid\u003ebuild\u003c/id\u003e\n    \u003cgoals\u003e\n        \u003cgoal\u003ecorepack\u003c/goal\u003e\n    \u003c/goals\u003e\n    \u003cconfiguration\u003e\n        \u003carguments\u003eyarn build\u003c/arguments\u003e\n    \u003c/configuration\u003e\n\u003c/execution\u003e\n```\n\nand if you're using `pnpm` instead, you'll want something like\n\n```xml\n\u003cexecution\u003e\n    \u003cid\u003einstall\u003c/id\u003e\n    \u003cgoals\u003e\n        \u003cgoal\u003ecorepack\u003c/goal\u003e\n    \u003c/goals\u003e\n    \u003cconfiguration\u003e\n        \u003carguments\u003epnpm install\u003c/arguments\u003e\n    \u003c/configuration\u003e\n\u003c/execution\u003e\n\u003cexecution\u003e\n    \u003cid\u003ebuild\u003c/id\u003e\n    \u003cgoals\u003e\n        \u003cgoal\u003ecorepack\u003c/goal\u003e\n    \u003c/goals\u003e\n    \u003cconfiguration\u003e\n        \u003carguments\u003epnpm build\u003c/arguments\u003e\n    \u003c/configuration\u003e\n\u003c/execution\u003e\n```\n\n### Running bower\n\nAll bower dependencies will be installed in the `bower_components` folder in your working directory.\n\n```xml\n\u003cexecution\u003e\n    \u003cid\u003ebower install\u003c/id\u003e\n    \u003cgoals\u003e\n        \u003cgoal\u003ebower\u003c/goal\u003e\n    \u003c/goals\u003e\n\n    \u003cconfiguration\u003e\n        \u003c!-- optional: The default argument is actually\n        \"install\", so unless you need to run some other bower command,\n        you can remove this whole \u003cconfiguration\u003e section.\n        --\u003e\n        \u003carguments\u003einstall\u003c/arguments\u003e\n    \u003c/configuration\u003e\n\u003c/execution\u003e\n```\n\n**Notice:** _Remember to gitignore the `bower_components` folder, unless you actually want to commit it._\n\n### Running Grunt\n\nIt will run Grunt according to the `Gruntfile.js` in your working directory.\nBy default, colors will be shown in the log.\n\n```xml\n\u003cexecution\u003e\n    \u003cid\u003egrunt build\u003c/id\u003e\n    \u003cgoals\u003e\n        \u003cgoal\u003egrunt\u003c/goal\u003e\n    \u003c/goals\u003e\n\n    \u003c!-- optional: the default phase is \"generate-resources\" --\u003e\n    \u003cphase\u003egenerate-resources\u003c/phase\u003e\n\n    \u003cconfiguration\u003e\n        \u003c!-- optional: if not specified, it will run Grunt's default\n        task (and you can remove this whole \u003cconfiguration\u003e section.) --\u003e\n        \u003carguments\u003ebuild\u003c/arguments\u003e\n    \u003c/configuration\u003e\n\u003c/execution\u003e\n```\n\n### Running gulp\n\nVery similar to the Grunt execution. It will run gulp according to the `gulpfile.js` in your working directory.\nBy default, colors will be shown in the log.\n\n```xml\n\u003cexecution\u003e\n    \u003cid\u003egulp build\u003c/id\u003e\n    \u003cgoals\u003e\n        \u003cgoal\u003egulp\u003c/goal\u003e\n    \u003c/goals\u003e\n\n    \u003c!-- optional: the default phase is \"generate-resources\" --\u003e\n    \u003cphase\u003egenerate-resources\u003c/phase\u003e\n\n    \u003cconfiguration\u003e\n        \u003c!-- optional: if not specified, it will run gulp's default\n        task (and you can remove this whole \u003cconfiguration\u003e section.) --\u003e\n        \u003carguments\u003ebuild\u003c/arguments\u003e\n    \u003c/configuration\u003e\n\u003c/execution\u003e\n```\n\n### Running jspm\n\nAll jspm dependencies will be installed in the `jspm_packages` folder in your working directory.\n\n```xml\n\u003cexecution\u003e\n    \u003cid\u003ejspm install\u003c/id\u003e\n    \u003cgoals\u003e\n        \u003cgoal\u003ejspm\u003c/goal\u003e\n    \u003c/goals\u003e\n\n    \u003cconfiguration\u003e\n\t    \u003c!-- optional: The default argument is actually\n\t    \"install\", so unless you need to run some other jspm command,\n\t    you can remove this whole \u003cconfiguration\u003e section.\n\t    --\u003e\n        \u003carguments\u003einstall\u003c/arguments\u003e\n    \u003c/configuration\u003e\n\u003c/execution\u003e\n```\n\n### Running Karma\n\n```xml\n\u003cexecution\u003e\n    \u003cid\u003ejavascript tests\u003c/id\u003e\n    \u003cgoals\u003e\n        \u003cgoal\u003ekarma\u003c/goal\u003e\n    \u003c/goals\u003e\n\n    \u003c!-- optional: the default plase is \"test\". Some developers\n    choose to run karma in the \"integration-test\" phase. --\u003e\n    \u003cphase\u003etest\u003c/phase\u003e\n\n    \u003cconfiguration\u003e\n        \u003c!-- optional: the default is \"karma.conf.js\" in your working directory --\u003e\n        \u003ckarmaConfPath\u003esrc/test/javascript/karma.conf.ci.js\u003c/karmaConfPath\u003e\n    \u003c/configuration\u003e\n\u003c/execution\u003e\n```\n\n**Skipping tests:** If you run maven with the `-DskipTests` flag, karma tests will be skipped.\n\n**Ignoring failed tests:** If you want to ignore test failures run maven with the `-Dmaven.test.failure.ignore` flag, \nkarma test results will not stop the build but test results will remain\nin test output files. Suitable for continuous integration tool builds.\n\n**Why karma.conf.ci.js?** When using Karma, you should have two separate\nconfigurations: `karma.conf.js` and `karma.conf.ci.js`. (The second one should inherit configuration\nfrom the first one, and override some options. The example project shows you how to set it up.)\nThe idea is that you use `karma.conf.js` while developing (using watch/livereload etc.), and\n`karma.conf.ci.js` when building - for example, when building, it should only run karma once,\nit should generate xml reports, it should run only in PhantomJS, and/or it should generate\ncode coverage reports.\n\n**Running Karma through Grunt or gulp:** You may choose to run Karma [directly through Grunt](https://github.com/karma-runner/grunt-karma) \nor [through gulp](https://github.com/karma-runner/gulp-karma) instead, as part of the `grunt` or `gulp` execution. That \nwill help to separate your frontend and backend builds even more.\n\n### Running Webpack\n\n```xml\n\u003cexecution\u003e\n    \u003cid\u003ewebpack build\u003c/id\u003e\n    \u003cgoals\u003e\n        \u003cgoal\u003ewebpack\u003c/goal\u003e\n    \u003c/goals\u003e\n\n    \u003c!-- optional: the default phase is \"generate-resources\" --\u003e\n    \u003cphase\u003egenerate-resources\u003c/phase\u003e\n\n    \u003cconfiguration\u003e\n        \u003c!-- optional: if not specified, it will run webpack's default\n        build (and you can remove this whole \u003cconfiguration\u003e section.) --\u003e\n        \u003carguments\u003e-p\u003c/arguments\u003e\n    \u003c/configuration\u003e\n\u003c/execution\u003e\n```\n\n### Running bun\n\n```xml\n\u003cexecution\u003e\n    \u003cid\u003ebun install\u003c/id\u003e\n    \u003cgoals\u003e\n        \u003cgoal\u003ebun\u003c/goal\u003e\n    \u003c/goals\u003e\n\n    \u003c!-- optional: default phase is \"generate-resources\" --\u003e\n    \u003cphase\u003egenerate-resources\u003c/phase\u003e\n\n    \u003cconfiguration\u003e\n        \u003c!-- optional: The default argument is actually\n        \"install\", so unless you need to run some other bun command,\n        you can remove this whole \u003cconfiguration\u003e section.\n        --\u003e\n        \u003carguments\u003einstall\u003c/arguments\u003e\n    \u003c/configuration\u003e\n\u003c/execution\u003e\n```\n\n### Optional Configuration \n\n#### Working directory\n\nThe working directory is where you've put `package.json` and your frontend configuration files (`Gruntfile.js` or \n`gulpfile.js` etc). The default working directory is your project's base directory (the same directory as your `pom.xml`). \nYou can change the working directory if you want:\n\n```xml\n\u003cplugin\u003e\n    \u003cgroupId\u003ecom.github.eirslett\u003c/groupId\u003e\n    \u003cartifactId\u003efrontend-maven-plugin\u003c/artifactId\u003e\n\n    \u003c!-- optional --\u003e\n    \u003cconfiguration\u003e\n        \u003cworkingDirectory\u003esrc/main/frontend\u003c/workingDirectory\u003e\n    \u003c/configuration\u003e\n\u003c/plugin\u003e\n```\n\n**Notice:** _Npm packages will always be installed in `node_modules` next to your `package.json`, which is default npm behavior._\n\n#### Installation Directory\n\nThe installation directory is the folder where your node and npm are installed.\nYou can set this property on the different goals. Or choose to set it for all the goals, in the maven configuration.\n\n```xml\n\u003cplugin\u003e\n    \u003cgroupId\u003ecom.github.eirslett\u003c/groupId\u003e\n    \u003cartifactId\u003efrontend-maven-plugin\u003c/artifactId\u003e\n\n    \u003c!-- optional --\u003e\n    \u003cconfiguration\u003e\n        \u003cinstallDirectory\u003etarget\u003c/installDirectory\u003e\n    \u003c/configuration\u003e    \n\u003c/plugin\u003e\n```\n\n#### Proxy settings\n\nIf you have [configured proxy settings for Maven](http://maven.apache.org/guides/mini/guide-proxies.html)\nin your settings.xml file, the plugin will automatically use the proxy for downloading node and npm, as well\nas [passing the proxy to npm commands](https://docs.npmjs.com/misc/config#proxy).\n\n**Non Proxy Hosts:** npm does not currently support non proxy hosts - if you are using a proxy and npm install\nis not downloading from your repository, it may be because it cannot be accessed through your proxy. \nIf that is the case, you can stop the npm execution from inheriting the Maven proxy settings like this:\n\n```xml\n\u003cconfiguration\u003e\n    \u003cnpmInheritsProxyConfigFromMaven\u003efalse\u003c/npmInheritsProxyConfigFromMaven\u003e\n\u003c/configuration\u003e\n```\n\nIf you have [configured proxy settings for Maven](http://maven.apache.org/guides/mini/guide-proxies.html)\nin your settings.xml file, the plugin will automatically [pass the proxy to bower commands](https://docs.npmjs.com/misc/config#proxy).\nIf that is the case, you can stop the bower execution from inheriting the Maven proxy settings like this:\n\n```xml\n\u003cconfiguration\u003e\n    \u003cbowerInheritsProxyConfigFromMaven\u003efalse\u003c/bowerInheritsProxyConfigFromMaven\u003e\n\u003c/configuration\u003e\n```\n\nIf you want to disable proxy for Yarn you can use `yarnInheritsProxyConfigFromMaven`. When you have proxy settings in your settings.xml file if you don't use this param it will run code below with proxy settings, in some cases you don't want that. Adding this param into the configuration section will solve this issue\n\n```xml\n\u003cexecution\u003e\n    \u003cid\u003etests\u003c/id\u003e\n    \u003cgoals\u003e\n        \u003cgoal\u003eyarn\u003c/goal\u003e\n    \u003c/goals\u003e\n    \u003cphase\u003ecompile\u003c/phase\u003e\n    \u003cconfiguration\u003e\n        \u003cyarnInheritsProxyConfigFromMaven\u003efalse\u003c/yarnInheritsProxyConfigFromMaven\u003e\n        \u003carguments\u003erun test\u003c/arguments\u003e\n    \u003c/configuration\u003e\n\u003c/execution\u003e\n\n```\n\n\n#### Environment variables\n\nIf you need to pass some variable to Node, you can set that using the property `environmentVariables` in configuration \ntag of an execution like this:\n\n```xml\n\u003cconfiguration\u003e\n    \u003cenvironmentVariables\u003e\n        \u003c!-- Simple var --\u003e\n        \u003cJon\u003eSnow\u003c/Jon\u003e\n        \u003cTyrion\u003eLannister\u003c/Tyrion\u003e\n        \n        \u003c!-- Var value take from maven properties --\u003e\n        \u003cNODE_ENV\u003e${NODE_ENV}\u003c/NODE_ENV\u003e\n    \u003c/environmentVariables\u003e        \n\u003c/configuration\u003e\n```\n\n#### Ignoring Failure\n\n**Ignoring failed tests:** If you want to ignore test failures in specific execution  you can set that using the property `maven.test.failure.ignore` in configuration tag of an execution like this:\n\n```xml\n\u003cconfiguration\u003e\n    \u003ctestFailureIgnore\u003etrue\u003c/testFailureIgnore\u003e\n\u003c/configuration\u003e\n```\n\n#### Skipping Execution\n\nEach frontend build tool and package manager allows skipping execution.\nThis is useful for projects that contain multiple builds (such as a module containing Java and frontend code).\n\n**Note** that if the package manager (npm or yarn) is skipped, other build tools will also need to be skipped because they\nwould not have been downloaded.\nFor example, in a project using npm and gulp, if npm is skipped, gulp must also be skipped or the build will fail.\n\nTools and property to enable skipping\n\n* npm `-Dskip.npm`\n* yarn `-Dskip.yarn`\n* bower `-Dskip.bower`\n* bun `-Dskip.bun`\n* grunt `-Dskip.grunt`\n* gulp `-Dskip.gulp`\n* jspm `-Dskip.jspm`\n* karma `-Dskip.karma`\n* webpack `-Dskip.webpack`\n\n## Eclipse M2E support\n\nThis plugin contains support for M2E, including lifecycle mappings and support for incremental builds in Eclipse.\nThe `install-node-and-npm` goal will only run on a full project build. The other goals support incremental builds\nto avoid doing unnecessary work. During an incremental build the `npm` goal will only run if the `package.json` file\nhas been changed. The `grunt` and `gulp` goals have new `srcdir` and `triggerfiles` optional configuration options; if\nthese are set they check for changes in your source files before being run. See the wiki for more information.\n\n## Helper scripts\n\nDuring development, it's convenient to have the \"npm\", \"bower\", \"grunt\", \"gulp\" and \"karma\" commands\navailable on the command line. If you want that, use [those helper scripts](frontend-maven-plugin/src/it/example%20project/helper-scripts)!\n\n## To build this project:\n\nRun `$ mvn clean install`\n\n## Issues, Contributing\n\nPlease post any issues on the [Github's Issue tracker](https://github.com/eirslett/frontend-maven-plugin/issues). \n[Pull requests](https://github.com/eirslett/frontend-maven-plugin/pulls) are welcome! \nYou can find a full list of [contributors here](https://github.com/eirslett/frontend-maven-plugin/graphs/contributors).\n\n## License\n\n[Apache 2.0](LICENSE)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feirslett%2Ffrontend-maven-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feirslett%2Ffrontend-maven-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feirslett%2Ffrontend-maven-plugin/lists"}