KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Usually, when I right-click an Ant buildfile in the Eclipse Package Explorer and select "Run As" from the context menu, I get the options "Ant Build" and "Ant Build..." to choose from. This is the correct behavior. Once in a while, those options get replaced by options that have nothing to do with Ant, like "JUnit test" and "Java applet." What can cause Eclipse to lose its context-sensitivity and not show the correct options there? How can I fix it? I've seen this in multiple versions of Eclipse, on both Windows XP and Windows 7. It doesn't seem to matter whether the file is named build.xml or not. Regardless of whether this error occurs, the build files are shown with the Ant icon in the Package Explorer, not the generic XML file icon. And even when the weird behavior happens, alternate methods of running the build do work, like going through the Run menu or opening the file and right-clicking the editor. The only "solution" I've been able to find so far is to keep restarting Eclipse until it starts working again, which is just kicking the can down the road, not actually solving anything. EDIT: I'm now experiencing occasional instances of context menus for Maven POMs displaying Ant build options under "Run As." Maybe "incorrect 'Run As' options" is a wider Eclipse issue?
Tags (comma-separated)
Save Edits
Cancel