MyEclipse 增量編譯/發布機制失效,常見原因:
菜單欄 → Project → Clean...
勾選項目 → 勾選 "Start a build immediately" → OK
效果:刪除所有編譯輸出,強制全量重新編譯,同步更新部署目錄。
# 關閉 Tomcat
# 刪除部署目錄下的項目文件夾
/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/你的項目/
# 或 Tomcat 安裝目錄
/tomcat/webapps/你的項目/
# 重新啟動 Tomcat,MyEclipse 會自動重新發布
# 命令行執行
mvn clean compile war:exploded
# 或 IDE 中
右鍵項目 → Run As → Maven clean
右鍵項目 → Run As → Maven install (勾選 skipTests)
# Windows: 使用 Process Explorer 搜索 .class 文件句柄
# Linux: lsof | grep 你的項目.class
Window → Preferences → Java → Compiler → Building
勾選 "Output folder" 詳細日誌
# 關閉 Eclipse
# 刪除 .metadata/.plugins/org.eclipse.core.resources/.projects/你的項目/
# 刪除 .metadata/.plugins/org.eclipse.jdt.core/ 緩存
# 啟動 Eclipse 導入項目
核心口訣:Clean → Build → Deploy → Restart,四步走解決 99% 類似問題。