eirslett / frontend-maven-plugin

"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.
Apache License 2.0
4.21k stars 867 forks source link

Add support to use the system wide installation of node.js #1015

Closed fabianfrz closed 2 years ago

fabianfrz commented 2 years ago

Summary

This allows to use the node.js version provided by the operating system (installed via pacman, apt, dnf, whatever).

Tests and Documentation

I guess this is hard to test as it heavily depends on the underlying operating system and it makes no sense to mock everything away. However I updated all relevant documentation.

eirslett commented 2 years ago

In your particular use case, the best fit is probably exec-maven-plugin, which will use the system node/npm.

I'm sorry to break the bad news, but this has been discussed a number of times before, and will not be implemented. The reasons are explained in the other GitHub issues.

https://github.com/eirslett/frontend-maven-plugin/issues/604

In a restricted environment, It is very uncommon that you can download arbitrary executables from all over the internet

The plugin supports proxies, so that you can host the executables locally behind your firewall (for example in a local Nexus setup)

It saves bandwidth of the build server since we don't have to download the npm and node in every build

This is already fixed by the plugin - it will always cache the downloaded node/npm, they will never be fetched from the network again.