如何在Eclipse中完全删除Liferay Workspace以重新创建?
Hey Eric, I’ve dealt with this exact frustrating issue before when working with Liferay Workspace in Eclipse. The IDE holds onto cached configurations even after you delete the project, which is why you’re seeing that error. Here’s how to fully wipe all traces and get back to creating a new workspace:
Step 1: Double-Check Eclipse Project List
First, make sure there’s no leftover project entry in Eclipse itself:
- Open Eclipse and go to the Package Explorer or Project Explorer view.
- If you still see the old Liferay Workspace project listed, right-click it and select Delete.
- In the pop-up window, ensure the box Delete project contents on disk (cannot be undone) is checked, then click OK.
Step 2: Clear Liferay Workspace Cache in Eclipse Metadata
This is the most critical step—Eclipse stores Liferay Workspace configs in its hidden metadata folder:
- Close Eclipse completely (don’t just minimize it).
- Navigate to your Eclipse workspace directory (this is the folder you selected when opening Eclipse, not the Liferay Workspace project folder).
- Go into the
.metadata/.plugins/com.liferay.ide.workspace.corepath. - Delete all files and subfolders inside this directory—these are the cached settings that tell Eclipse a Liferay Workspace exists.
- Optional extra check: Head to
.metadata/.plugins/org.eclipse.core.resources/.projectsand delete any folders with the name of your old Liferay Workspace (if present).
Step 3: Delete the Liferay Workspace Files from Your System
Even if you deleted the project in Eclipse, sometimes the actual files are still on your disk:
- Find the directory where you originally created the Liferay Workspace project.
- Delete the entire folder manually (make sure you don’t need any files from it first!).
Step 4: Restart Eclipse and Create a New Workspace
Once you’ve completed the above steps, restart Eclipse. You should now be able to create a new Liferay Workspace project without seeing the error message.
Quick Note
If you’re worried about accidentally deleting something important, make a backup of the .metadata folder before modifying it. This way you can restore it if anything goes wrong.
内容的提问来源于stack exchange,提问作者EricMacau

