In Run/Debug configuration there is no option to select clean in section Before launch. How to make run configuration so IntelliJ 12 would clean output directory before deploying there?
In the menubar select Build -> BuildArtifacts -> All Artifacts -> Clean

First, open File | Settings | Compiler then ensure that Clear output directory on rebuild is enabled. Then hit Alt+B,r to rebuild your project.
edit: If you really want to rebuild before each launch, you can create a custom ant script and invoke it before launch, like so.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With