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 869 forks source link

Multimodule skipping (parameter inherit) #920

Open enexusde opened 4 years ago

enexusde commented 4 years ago

If you have a structure like this:

And configure the app's pom.xml to run :npm you like to skip :npm for App and Backend.

In order to skip the execution for App and Backend you specify a skip.npm=true in the App's pom.xml and skip.npm=false in Fe1 and Fe2.

The build will fail having the message:

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.10.0:npm (default-cli) on project backend: Failed to run task: 'npm install' failed. java.io.IOException: Cannot run program "XXX\backend\node\node.exe" (in directory "XXX\backend"): CreateProcess error=2, Das System kann die angegebene Datei nicht finden -> [Help 1]

Backend should not run the npm because it is skipped by skip.npm=true from the parent's pom.

neoxpert commented 3 years ago

When it comes down to properties / profiles / modules the problem may reside within the poms and not withing the plugin, as those do not take care about resolving and/or setting variables.

Can you give a bit more detailed insight into your pom structure?