2012-11-09 50 views
0

我想將Apache James Server項目導入到Eclipse中。如何讓Eclipse/m2eclipse接受一個沒有懸掛的大型項目?

我已經實現了導入,建立和運行近一個星期前,但現在我不能。

現在開始掛在「導入Maven項目93%」

我試過幾種情況

1)我有m2eclipse插件,並有一個嵌入式Maven和使用它。

掛在點是%93

2)此外,我有在Ubuntu命令行行家,當我設置該行家(更改嵌入到這一點)通過「窗口-Prefrences-Maven的安裝到Eclipse 「

掛在%93

3)經過了一個新鮮的軀幹和試圖導入

同樣的結果

有很多隻有一根根球的項目,每次我嘗試時,掛在同一個子項目上。

這裏有一個帖子,所以,用戶的答案告訴它是關於代理。

我控制了我的代理設置,並且沒有指定IP地址和端口。

此外,我想問,如果是關於代理,我如何導入並能夠運行該項目?

與此相關的情況下我的Eclipse工作空間日誌:

!ENTRY org.eclipse.core.resources 4 4 2012-11-09 18:31:14.132 
!MESSAGE Exception loading preferences from: /james-server-queue-activemq/.settings/org.eclipse.core.resources.prefs. 
!STACK 1 
org.eclipse.core.runtime.CoreException: File not found: /home/gobito-merve/dev/workspace091112/james-server-queue-activemq/.settings/org.eclipse.core.resources.prefs. 
    at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:55) 
    at org.eclipse.core.internal.filesystem.local.LocalFile.openInputStream(LocalFile.java:371) 
    at org.eclipse.core.internal.localstore.FileSystemResourceManager.read(FileSystemResourceManager.java:797) 
    at org.eclipse.core.internal.resources.File.getContents(File.java:289) 
    at org.eclipse.core.internal.resources.ProjectPreferences.load(ProjectPreferences.java:461) 
    at org.eclipse.core.internal.preferences.EclipsePreferences.create(EclipsePreferences.java:387) 
    at org.eclipse.core.internal.preferences.EclipsePreferences.getChild(EclipsePreferences.java:500) 
    at org.eclipse.core.internal.preferences.EclipsePreferences.internalNode(EclipsePreferences.java:629) 
    at org.eclipse.core.internal.preferences.EclipsePreferences.node(EclipsePreferences.java:757) 
    at org.eclipse.core.internal.resources.CharsetManager.isDerivedEncodingStoredSeparately(CharsetManager.java:367) 
    at org.eclipse.core.internal.resources.CharsetManager.getPreferences(CharsetManager.java:294) 
    at org.eclipse.core.internal.resources.CharsetManager.getCharsetFor(CharsetManager.java:278) 
    at org.eclipse.core.internal.resources.Project.getDefaultCharset(Project.java:420) 
    at org.eclipse.ltk.internal.core.refactoring.resource.undostates.ContainerUndoState.<init>(ContainerUndoState.java:133) 
    at org.eclipse.ltk.internal.core.refactoring.resource.undostates.ProjectUndoState.<init>(ProjectUndoState.java:48) 
    at org.eclipse.ltk.internal.core.refactoring.resource.undostates.ResourceUndoState.fromResource(ResourceUndoState.java:44) 
    at org.eclipse.ltk.core.refactoring.resource.DeleteResourceChange.perform(DeleteResourceChange.java:130) 
    at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:278) 
    at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:278) 
    at org.eclipse.ltk.core.refactoring.PerformChangeOperation$1.run(PerformChangeOperation.java:258) 
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344) 
    at org.eclipse.ltk.core.refactoring.PerformChangeOperation.executeChange(PerformChangeOperation.java:306) 
    at org.eclipse.ltk.internal.ui.refactoring.UIPerformChangeOperation.executeChange(UIPerformChangeOperation.java:92) 
    at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:218) 
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344) 
    at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87) 
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) 
Caused by: java.io.FileNotFoundException: /home/gobito-merve/dev/workspace091112/james-server-queue-activemq/.settings/org.eclipse.core.resources.prefs (No such file or directory) 
    at java.io.FileInputStream.open(Native Method) 
    at java.io.FileInputStream.<init>(FileInputStream.java:138) 
    at org.eclipse.core.internal.filesystem.local.LocalFile.openInputStream(LocalFile.java:362) 
    ... 25 more 
!SUBENTRY 1 org.eclipse.core.filesystem 4 271 2012-11-09 18:31:14.133 
!MESSAGE File not found: /home/gobito-merve/dev/workspace091112/james-server-queue-activemq/.settings/org.eclipse.core.resources.prefs. 
!STACK 0 
java.io.FileNotFoundException: /home/gobito-merve/dev/workspace091112/james-server-queue-activemq/.settings/org.eclipse.core.resources.prefs (No such file or directory) 
    at java.io.FileInputStream.open(Native Method) 
    at java.io.FileInputStream.<init>(FileInputStream.java:138) 
    at org.eclipse.core.internal.filesystem.local.LocalFile.openInputStream(LocalFile.java:362) 
    at org.eclipse.core.internal.localstore.FileSystemResourceManager.read(FileSystemResourceManager.java:797) 
    at org.eclipse.core.internal.resources.File.getContents(File.java:289) 
    at org.eclipse.core.internal.resources.ProjectPreferences.load(ProjectPreferences.java:461) 
    at org.eclipse.core.internal.preferences.EclipsePreferences.create(EclipsePreferences.java:387) 
    at org.eclipse.core.internal.preferences.EclipsePreferences.getChild(EclipsePreferences.java:500) 
    at org.eclipse.core.internal.preferences.EclipsePreferences.internalNode(EclipsePreferences.java:629) 
    at org.eclipse.core.internal.preferences.EclipsePreferences.node(EclipsePreferences.java:757) 
    at org.eclipse.core.internal.resources.CharsetManager.isDerivedEncodingStoredSeparately(CharsetManager.java:367) 
    at org.eclipse.core.internal.resources.CharsetManager.getPreferences(CharsetManager.java:294) 
    at org.eclipse.core.internal.resources.CharsetManager.getCharsetFor(CharsetManager.java:278) 
    at org.eclipse.core.internal.resources.Project.getDefaultCharset(Project.java:420) 
    at org.eclipse.ltk.internal.core.refactoring.resource.undostates.ContainerUndoState.<init>(ContainerUndoState.java:133) 
    at org.eclipse.ltk.internal.core.refactoring.resource.undostates.ProjectUndoState.<init>(ProjectUndoState.java:48) 
    at org.eclipse.ltk.internal.core.refactoring.resource.undostates.ResourceUndoState.fromResource(ResourceUndoState.java:44) 
    at org.eclipse.ltk.core.refactoring.resource.DeleteResourceChange.perform(DeleteResourceChange.java:130) 
    at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:278) 
    at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:278) 
    at org.eclipse.ltk.core.refactoring.PerformChangeOperation$1.run(PerformChangeOperation.java:258) 
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344) 
    at org.eclipse.ltk.core.refactoring.PerformChangeOperation.executeChange(PerformChangeOperation.java:306) 
    at org.eclipse.ltk.internal.ui.refactoring.UIPerformChangeOperation.executeChange(UIPerformChangeOperation.java:92) 
    at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:218) 
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344) 
    at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87) 
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) 

感謝您的建議。

+0

你總是可以從圖片中消除日食。從命令行客戶端檢出項目,並使用命令行maven構建它。然後,在eclipse中,將「導入」作爲「現有Maven項目」。 – chad

+0

你可以嘗試使用maven-eclipse-plugin來查看它是否有所作爲。嘗試「mvn eclipse:eclipse」,然後加載生成的eclipse項目。 – maba

+0

@chad感謝您的回覆。我做了你所說的成功,看到「建立成功」,但現在我怎麼能告訴eclipse導入不能建立,它仍然掛在%93 – merveotesi

回答

0

我已經將我的eclipse的文件夾從一個地方移到另一個地方,並且該文件夾有錯誤的根權限。因此當我調用eclipse時,我用超級用戶和日食的M2_REPO路徑改爲/root/.m2/repository。現在我改變了previliges和M2_REPO被設置爲/home/myuser/.m2/repository並且問題已經消失。

1

有時候一個項目對Eclipse/m2eclipse來說太大了,至少在我的經驗中。這裏有一些技巧,我用它來哄騙Eclipse來處理大項目。

1)關閉「自動構建」功能 - 似乎這是通常會破壞月蝕的背影。

2)考慮關閉其他m2eclipse maven功能,如下載源和javadoc;這些都很慢。

3)執行SCM從communline檢出項目,並從命令行構建它們。我建議讓Maven現在檢索源代碼和javadocs;這樣你就不會讓日食做這麼大的瑣事。

4)在Eclipse中,只導入您需要的模塊「導入現有Maven項目」。考慮到你不需要一個模塊來作爲eclipse項目來閱讀它的源代碼。如果你已經在命令行編譯期間下載了源代碼,那麼你在eclipse中擁有的任何項目都將能夠進入它的依賴源代碼,無論是在代碼瀏覽和調試中,因爲eclipse知道如何在你的代碼中找到源文件當地的maven回購。

如果有人有更多關於如何充分利用m2eclipse的技巧,我很樂意看到它們添加到這裏。

相關問題