2011-12-06 32 views
20

在我的一個新項目中,我看不到項目屬性中的部署程序集鏈接。 它是在我的其他項目中配置相同的方式(據我所知)。Eclipse部署程序集未出現在屬性中

我有動態的Web模塊和Java方面。我安裝了m2eclipse並調用了菜單選項「更新項目配置」。我正在運行eclipse 3.7 EE版。我也有谷歌Eclipse插件。

我想知道的是如何讓部署程序集選項出現,以便我可以配置哪些資源通過WTP推送到本地服務器。

我的項目文件:

<?xml version="1.0" encoding="UTF-8"?> 
<projectDescription> 
    <name>shortbread</name> 
    <comment></comment> 
    <projects> 
    </projects> 
    <buildSpec> 
     <buildCommand> 
      <name>org.eclipse.jdt.core.javabuilder</name> 
      <arguments> 
      </arguments> 
     </buildCommand> 
     <buildCommand> 
      <name>org.eclipse.wst.common.project.facet.core.builder</name> 
      <arguments> 
      </arguments> 
     </buildCommand> 
     <buildCommand> 
      <name>com.google.gdt.eclipse.core.webAppProjectValidator</name> 
      <arguments> 
      </arguments> 
     </buildCommand> 
     <buildCommand> 
      <name>com.google.gwt.eclipse.core.gwtProjectValidator</name> 
      <arguments> 
      </arguments> 
     </buildCommand> 
     <buildCommand> 
      <name>org.eclipse.m2e.core.maven2Builder</name> 
      <arguments> 
      </arguments> 
     </buildCommand> 
    </buildSpec> 
    <natures> 
     <nature>org.eclipse.jdt.core.javanature</nature> 
     <nature>org.eclipse.m2e.core.maven2Nature</nature> 
     <nature>org.eclipse.wst.common.project.facet.core.nature</nature> 
     <nature>com.google.gwt.eclipse.core.gwtNature</nature> 
    </natures> 
</projectDescription> 
+0

我有同樣的問題了,你有沒有找到解決方案? – gtiwari333

回答

36

嘗試添加<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>到您的項目文件。插件間諜(ALT + SHIFT + F1)對於找出類似的東西非常有幫助。屬性頁面在插件org.eclipse.wst.common.modulecore.ui和plugin.xml文件中定義,您可以看到DeploymentAssemblyPage爲enabledWhenprojectNatureorg.eclipse.wst.common.modulecore.ModuleCoreNature

+2

未修復我的GAE示例。出現部署程序集選項時會顯示「錯誤檢查項目構面」。 – vharron

+0

ModuleCoreNature爲我工作。謝謝。 – mentallurg

+0

在一百年內不會發現這一點。 – nanoquack

12

當我試圖此配置增加。項目,我有這樣的wharron,「錯誤檢查項目構面」,然後我去了「項目Facet」構建路徑的選擇了同樣的問題,我選擇了一個自定義的,然後檢查選項「Utility Module」,Applied,下次打開構建路徑時,部署程序集在那裏並且工作正常。

+0

謝謝@Alejandra。這對Eclipse Luna 4.4.0有幫助。 –

+0

謝謝亞歷杭德拉,它幫助了我! –

2

正如接受的答案中建議將<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>添加到.project文件中,並且還要添加<nature>org.eclipse.wst.common.project.facet.core.nature</nature>來解決部署組件屏幕中的「錯誤檢查項目構面」。

**如果導入現有項目保留「現有項目描述符」不要覆蓋作爲eclipse將在大多數情況下從.project文件中刪除這些性質。

2

我也面臨同樣的問題,我按照下面的步驟,我的問題得到解決。我檢查了我的動態網頁模塊在第二個屏幕。

enter image description here

enter image description here

enter image description here

0

有兩個簡單的步驟

解決了這個
  1. right click on the project > Build path > configure build path > Project facets然後確保你有Dynamic Web Module檢查

  2. 右擊項目>運行方式>在服務器上運行

,那麼你可以看到錯誤被要回

Build path > configure build path > Deployment ssembly

相關問題