However, when I run the war from inside intellij my mojo doesn't run. (Not only that, but if the files had previously been extracted hitting run deletes them.)
Now I can tell IntelliJ to go and run my mojo manually and that works, however I'd prefer this wasn't required.
When IntelliJ is starting a war does it actually run a maven package or does it do it's own thing? If so what maven command is it running?
What do I need to do to make IntelliJ run my mojo without being manually told about it?