문제

I see a lot of newer Maven plugins for JavaScript require NodeJS to be installed on the machine where the build takes place (both local and CI servers). For example: yeoman-maven-plugin, npm-maven-plugin, etc.

The question is: Does it make sense to check for existence of NodeJS and install it if missing via Maven as a dependency?

Bonus question: If you think this is a good idea, how would you accomplish this task?

도움이 되었습니까?

해결책

You could try the frontend-maven-plugin (via https://stackoverflow.com/a/19600777/1024571). According the docs:

This plugin downloads/installs Node and NPM locally for your project, runs NPM install, Grunt and/or Karma

Basically it allows you to use Node as part of your build process without requiring it to be installed globally on the build machine.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top