Disable compile-theme goal only when debug

How can I set the <goal>compile-theme</goal only when running the app as production, but not during a debug (Debug > As Server, in Eclipse for example).

Thank you.


Only way I can think of out the top of my head is that maybe you could create a temporary
styles.css file, since that will disable theme compilation


what about using maven profiles? Configure the plugin in build section without define and add a a profile (eg production) that reconfigures the plugin specifying the execution of compile-theme goal