intellij deleting all files in compile output path

已回答

I've been having an issue with intellij for a while now, it is deleting all the files in my flex compile output path. I don't have to say what a huge problem that can create, thank god for git. Does anyone know why this could be happening? Or is this a legit intellij bug?

评论操作 固定链接

Definitely not a bug. It is a much desired feature. IntelliJ IDEA is doing a clean build. A corner stone of good build practices. I guess I do not understand why you would have compiled output checked into version control. Typically version control only contains source code, not built artifacts.

Nevertheless, if you do not desire this behavior, go into Settings (File > Settings or ctrl+alt+S). Under Project Settings, select the "Compiler" node. On the left, uncheck "Clear output directory on rebuild". Note that this is a per project setting. You can, if desired, change it in the project template settigs (Settings > Other Settings > Template Settings).

0
评论操作 固定链接

believe me, you do NOT want to keep old files in your output path. the sources and the output *will* get out of sync, which will make you spent countless hours debugging magic code that doesn't do what the source says

0
评论操作 固定链接

Believe me, in some project I want to keep content of output folder. The output folder is source folder of another project, and it contains some assets.

0
评论操作 固定链接

you mean you want to mix the output folder and something else and use that as the input folder for a second project?

then wouldn't it be better if you had a dedicated folder for that?

0
评论操作 固定链接

Maybe it could work also other way, but I want avoid duplication of files, so I have some assets in output folder, where compiler outputs compiled .js files, and this folder is later packaged into other project that uses the .js and other stuff in the folder.

This works good for me, so I intentionally disable the Clear output directory on rebuild option.

 

0

请先登录再写评论。