Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 356656

Summary: Virgo Plan project facet requires Spring nature
Product: [RT] Virgo Reporter: Alexey Romanov <alexey.v.romanov>
Component: toolingAssignee: Project Inbox <virgo-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: eclipse, leo.dos.santos, milesparker, mlippert
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 370029    
Bug Blocks: 371023    

Description Alexey Romanov CLA 2011-09-03 03:50:01 EDT
Build Identifier: 

According to the Programmer Guide, plan projects should be created as follows:

> This is done by creating a new faceted project and then applying the OSGi Plan facet.

However, doing this gives the following error:

> Nature org.eclipse.virgo.ide.facet.core.plannature is missing prerequisite nature org.springframework.ide.eclipse.core.springnature.

and the plan facet is not added. Adding the facet to a Spring project works.

Reproducible: Always

Steps to Reproduce:
Create a new faceted project and then apply the OSGi Plan facet.
Comment 1 Miles Parker CLA 2012-02-08 14:37:04 EST
Hmm.. right now it's working, but that's because it is now actually adding the org.springframework.ide.eclipse.core.springnature facet! Don't know how that got in there, but my understanding is that we do not want that added, *and* we don't want the error.
Comment 2 Miles Parker CLA 2012-02-08 15:21:23 EST
Unless I hear otherwise, I'm going to assume that we also want to get rid of the:

org.springframework.ide.eclipse.core.springbuilder

But the virgo pannature is also getting added. 

org.eclipse.virgo.ide.facet.core.plannature

I'm going to assume that we want that nature in addition to adding the facet?

Now, the weird thing is that the code for adding the plan facet doesn't seem to be doing anything. That's:

				fProject.installProjectFacet(ProjectFacetsManager.getProjectFacet(FacetCorePlugin.PLAN_FACET_ID)
						.getDefaultVersion(), null, monitor);
						
Instead, it all seems to be coming as a consequence of adding the Spring nature. Some kind of magic going on there.
Comment 3 Leo Dos Santos CLA 2012-02-08 16:13:16 EST
(In reply to comment #2)
> Now, the weird thing is that the code for adding the plan facet doesn't seem to
> be doing anything. That's:
> 
>                
> fProject.installProjectFacet(ProjectFacetsManager.getProjectFacet(FacetCorePlugin.PLAN_FACET_ID)
>                         .getDefaultVersion(), null, monitor);
> 
> Instead, it all seems to be coming as a consequence of adding the Spring
> nature. Some kind of magic going on there.

Miles that looks right to me. You'll want to remove the bit that adds the Spring nature though. You'll also want to go to the plugin.xml for all 3 of our facet types (Plan, PAR & Bundle) & remove the <requires-nature> dependency on the Spring nature.