by
admin / June 8th, 2010
Did you ever wounder what defines if a project is “pure” Java project or a Plugin project?

Have a look at the “.project” file. This file contains the description of your project. It contains a XML tag “natures” where the nature of the project is described. A plugin project has the nature “org.eclipse.pde.PluginNature” and a java project has the nature “org.eclipse.jdt.core.javanature”.
These tags will also steer some behavior of the development environment, e.g. a project with PluginNature will update the java class path if you change the dependency information in a plugin project. For example if you add the “org.eclipse.pde.PluginNature” to an existing Java project you get the PDE menu for your project.

Did you ever wounder what defines if a project is "pure" Java project or a Plugin project?
Have a look at the ".project" file. This file contains the description of your project. It contains a XML tag "natures" where the nature of the project is described. A plugin project has the nature "org.eclipse.pde.PluginNature" and a java project has the nature "org.eclipse.jdt.core.javanature".
These tags will also steer some behavior of the development environment, e.g. a project with PluginNature will update the java class path if you change the dependency information in a plugin project. For example if you add the "org.eclipse.pde.PluginNature" to an existing Java project you get the PDE menu for your project.
Filed under:
Eclipse
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
June 8th, 2010 at 1:33 pm
I struggled a few times with this already
There are a few gotchas when modifiying the .project file while the project’s already present & active in the workspace. I usually tried this when importing maven projects I checked out in a first step (checkout maven project with m2eclipse has a bug, the wizard is not usable). The import stalled several times or even failed, leaving incomplete project that do not have the java nature. I then tried to add the java nature by hand. Unfortunately eclipse couldn’t manage this change. Even closing and reopen the project does not help. I had to delete an reimport.
June 8th, 2010 at 8:11 pm
@André Seems like Maven introduces sometimes also problems.