2012-08-10 158 views
0

我对Eclipse很陌生。Eclipse Spring Maven项目

所以我安装了最新的Eclipse Juno,m2e和SpringIDE。

我没有理解如何使用上述软件组合来创建Maven Spring项目。

了Eclipse UI给我的唯一的选择是要么Maven项目,或Spring项目: enter image description here

我知道这IS可以在Eclipse中的Maven/Spring项目,居然和我有一个:

enter image description here

而是使之可能,我不得不创建一个Spring项目和手动编辑的项目文件,包括Maven的性质和构建命令:

<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> 

和项目文件包括构建路径:

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

问:

我该怎么做,从没有项目文件修改Eclipse的用户界面?

有没有什么办法可以从UI为Eclipse项目添加属性?

感谢

回答

2

尝试在Project Explorer中的项目右键 - >配置 - >转换为Maven项目

+0

如果这是一个maven项目,我相信你可以添加一个“添加弹簧性质”的项目或与这些词非常相似的东西(我没有安装插件的ATM)。 – WhyNotHugo 2012-08-11 00:19:17