0

I'm kind of new to Eclipse.

So I installed the latest Eclipse Juno, m2e and SpringIDE.

I failed ho understand how to create a Maven Spring project with the above combination of software.

The only options that Eclipse UI gives me is either a Maven project, or a Spring project: enter image description here

I know that it IS possible to have a Maven/Spring project in Eclipse, and I actually have one:

enter image description here

But to make it possible I had to create a Spring project and to manually edit its .project file to include Maven nature and build command:

<buildSpec>
    <buildCommand>
        <name>org.eclipse.wst.common.project.facet.core.builder</name>
        <arguments>
        </arguments>
    </buildCommand>
    <buildCommand>
        <name>org.eclipse.jdt.core.javabuilder</name>
        <arguments>
        </arguments>
    </buildCommand>
    <buildCommand>
        <name>org.springframework.ide.eclipse.core.springbuilder</name>
        <arguments>
        </arguments>
    </buildCommand>
    <buildCommand>
        <name>org.eclipse.m2e.core.maven2Builder</name>
        <arguments>
        </arguments>
    </buildCommand>
</buildSpec>
<natures>
    <nature>org.springframework.ide.eclipse.core.springnature</nature>
    <nature>org.eclipse.jdt.core.javanature</nature>
    <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
    <nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>

and .project file to include build path:

<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
    <attributes>
        <attribute name="maven.pomderived" value="true"/>
    </attributes>
</classpathentry>

Question:

How do I do that from Eclipse UI without .project file modification?

It there any way I can add natures to Eclipse projects from UI?

Thanks

Oleg Mikheev
  • 17,186
  • 14
  • 73
  • 95

2 Answers2

2

Try right click on the project in project explorer -> configure -> convert to maven project

soulcheck
  • 36,297
  • 6
  • 91
  • 90
  • If it's a maven project, I belive you can add a "add spring nature" to project or something very similar to those words (I don't have the plugin installed ATM). – WhyNotHugo Aug 11 '12 at 00:19
1

Add Spring Project Nature

This option is available e.g. when using SpringSource Toolsuite

digitalbreed
  • 3,953
  • 4
  • 26
  • 24