IntelliJ IDEA 11.1.1
I am trying to configure a module so that compiler output files (.class files) are produced in the same directory as the corresponding Java source files.
1) Is there a way to directly state "compile to same dir"? There doesn't seem to be that option in the Project Structure dialog Modules > Paths tab, unless the idea is to use dot in some clever way?
2) For module with a single source dir, I tried using the "Use module compile path" and set it to the corresponding src dir. That cause the IDE to ignore the src directory as a location of source files.
3) I saw in the docs that the "Exclude output paths" checkbox really means "Ignore source code in output path directories", so I unchecked that. The source files reappearedin the IDE project tree.
4) I recompiled, and the result was that the IDE actually deleted all the source files! I assume that this was following the logic that old files in the output directory should all be deleted prior to compiling?
At any rate, if the IDE has an explicit checkbox to permit output to source directories, it seems like a bug to me for the IDE to delete the source files.
Bottom line: Is there a way to "compile to same directory"?