开发者

How do I reinstall Eclipse without losing my projects and plugins?

开发者 https://www.devze.com 2022-12-14 00:49 出处:网络
开发者_开发知识库My Eclipse recently broke completely and I have upgraded to Galileo. I have created a fresh workspace (say foo/workspace) and created a trivial project. I have then copied an old proj
开发者_开发知识库

My Eclipse recently broke completely and I have upgraded to Galileo. I have created a fresh workspace (say foo/workspace) and created a trivial project. I have then copied an old project from (bar/workspace/myproject) to foo/workspace/myproject. It is mavenised and has a pom.xml. How do I tell Eclipse to build it (it does not seem to recognise it is mavenised). Do I have to install the maven plugin?

In general what is the smoothest way to reinstall Eclipse (i.e. what else do I need to think about?)


  1. I never create or checkout a project directly under the Workspace but rather use something like ~/Projects for all my projects. This allows me to remain IDE independent. Actually, I never use any IDE to create a project.

  2. I share my workspace location across several Eclipse install (specified at startup or using -data). If anything goes wrong, I don't mind deleting and loosing my workspace, it doesn't contain anything really important anyway.

  3. Use the m2eclipse Eclipse plugin to Import > Maven Projects into Eclipse. Another option is to use the maven eclipse plugin to generate the .project and .classpath from the command line and then to Import > Existing Projects into Workspace from Eclipse.


It is better to reference directly your old workspace when starting your new eclipse installation: see this eclipse.ini

-data
c:/a/path/to/your/old/workspace

That way, you get back all your projects.

You can install the m2eclipse maven plugin by adding its update site to the list of sites examined by the eclipse p2 provisioning mechanism

http://m2eclipse.sonatype.org/update/


If the metadata associated with your workspace is messed up, and it sounds like it is, the easiest thing to do is simply delete the .metadata folder from the workspace (or rename it to something else). Start up Eclipse, it will show an empty workspace, and then use File -> Import to import existing projects back into your workspace. Just point it to the folder of the existing project and it will do the right thing, leaving the project in place.

For the maven stuff, the Import Maven projects mentioned above seems right and probably does some other stuff to have maven work out.

0

精彩评论

暂无评论...
验证码 换一张
取 消