Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make IntelliJ to clean output artifact directory before deploy?

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?

like image 969
J.Olufsen Avatar asked Jun 15 '14 14:06

J.Olufsen


2 Answers

In the menubar select Build -> BuildArtifacts -> All Artifacts -> Clean

IntelliJ IDEA how to clean artifacts

like image 159
raviteja yakkaladevi Avatar answered Nov 08 '22 19:11

raviteja yakkaladevi


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.

like image 41
breandan Avatar answered Nov 08 '22 20:11

breandan