2012-08-10 155 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