Open cmarchand opened 2 years ago
There is the npx
goal which would probably work almost exactly as you want: <arguments>xslt3 -xsl:...
You might also want to consider https://docs.npmjs.com/cli/v6/using-npm/scripts -- in particular I'm guessing that you want to do this xslt call as part of the preinstall or postinstall of your package or something like that. But even if not, you can add it as its own script and then make the f-e-p goal npm
and the arguments run compile-xslt
.
FYI npm run
of npm 7.x has a strange behaviour
https://docs.npmjs.com/cli/v7/using-npm/scripts#user
When npm is run as root, scripts are always run with the effective uid and gid of the working directory owner.
As a result, it runs as different user from maven... hitting the permission issue 🤦
Right now I'm just using a script to set up PATH with node/npm installed from this plugin.
Some frameworks need to pre-compile some files before making the front app available. See xslt3 for example where we need to pre-compile xslt files with this commande :
Actually, there is no Mojo that directly allows to call
node
with specific parameters. I need one, with this usage :I just open the issue to be referenced in the pull request.