Ant targets missing in IDEA Ultimate 2018.2
已回答
Just upgraded from 2018.1 to 2018.2. Now, all my ant targets are missing in the "Build" menu and the "Ant Build" tool window. The .xml files are displayed, but no targets.
I tried invalidating the cache and restarting. Also, I tried a fresh install (instead of upgrade) of 2018.2. Nothing seems to help.
Anything else I can try?
Thanks.
请先登录再写评论。
Are there any errors in idea.log (https://intellij-support.jetbrains.com/hc/articles/207241085)?
If you open the build file properties dialog, do you see the targets with the checkmarks there?
No errors in the log. Also, nothing except the message "Nothing to show" in the "Filters" tab of the "Build File Properties" dialog. I should have noted these in my original post.
Another tidbit of info. Normally, the value of the "name" attribute of the "project" element is displayed in both the "Ant Build" tool window and the "Build" menu. However, with the onset of this problem, the file name is displayed instead.
Since my original post, I have found a random build.xml file that works correctly in 2018.2. It almost seems like there is something in the original set of .xml files that is causing a (silent) parse failure in 2018.2, but not 2018.1. The .xml files in question are well-structured and show no errors in the editor.
Thank you for the response.
Please file a bug at https://youtrack.jetbrains.com/issues/IDEA and attach a sample project to reproduce this issue.
I finally discovered the cause of this. The ant files have lived (until now) in .idea/dx. (They are not part of my product build. They automate several non-build activities.)
I'm guessing a change in 2018.2 makes the .idea directory off-limits, which is reasonable. If I move my dx ant files outside of the .idea directory, things work as expected.
Thanks.