Trigger for Ant build target not saving
Answered
I've set up a "Before Compilation" trigger on an Ant target, and it works great. The problem is that whenever I close and reopen the project, the trigger is gone. What am I doing wrong?
Please sign in to leave a comment.
Please file a bug at https://youtrack.jetbrains.com/issues/IDEA and provide the reproducible test case and idea.log (https://intellij-support.jetbrains.com/hc/articles/207241085).
In the process of trying to create a simple reproducible test case, I found that only one of my projects actually exhibits the problem -- in every other project I have, the Ant target triggers are saved correctly. I also found that if I manually edit the .ipr file of the affected project to add an <executeOn> element to the Ant configuration, it doesn't disappear when the .ipr file is modified by IDEA -- even if I remove the trigger in the Ant Build panel. Finally, I found that none of these actions (opening/closing the project, adding/removing triggers) writes anything to idea.log at all. I'm not immediately seeing how the project that doesn't work is different from all the other ones that do, so I guess I'm not sure I have anything useful I could attach to a bug report.
Try converting the project to .idea (directory based) format via the File menu. It could be an issue specific to the legacy projects (ipr) or projects generated using third-party tools.