I\'m looking to find a way of disabling a plugin execution if running with a particular profile.
This is the opposite of running a plugin if a profile is selected.>
There is a neat way to disable plugin execution when specific profile is active.
Firstly you need to add an identifier to plugin execution like:
nl.geodienstencentrum.maven
sass-maven-plugin
2.1
styles-compilation
generate-resources
update-stylesheets
Then you need to define a profile in which this plugin will NOT be executed:
no-sass
nl.geodienstencentrum.maven
sass-maven-plugin
2.1
styles-compilation
none
Now if you run standard maven build:
mvn clean package
the sass-maven-plugin will be executed, yet when running:
mvn clean package -P no-sass
the sass-maven-plugin will not be executed.