我已經使用選項簽出在Eclipse中Maven項目:路徑必須包括項目和資源名稱/錯誤
Import > Maven > Check out Maven Projects from SCM
當我嘗試使用建項目:
Project > Clean
我得到以下錯誤:
Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
堆棧跟蹤:
java.lang.IllegalArgumentException: Path must include project and resource name:/
at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
at org.eclipse.core.internal.resources.Workspace.newResource(Workspace.java:2163)
at org.eclipse.core.internal.resources.Container.getFolder(Container.java:222)
at org.sonatype.m2e.mavenarchiver.internal.AbstractMavenArchiverConfigurator.mavenProjectChanged(AbstractMavenArchiverConfigurator.java:178)
at org.sonatype.m2e.mavenarchiver.internal.AbstractMavenArchiverConfigurator.mavenProjectChanged(AbstractMavenArchiverConfigurator.java:170)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.mavenProjectChanged(ProjectConfigurationManager.java:905)
at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.notifyProjectChangeListeners(ProjectRegistryManager.java:732)
at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.applyMutableProjectRegistry(ProjectRegistryManager.java:855)
at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:279)
at org.eclipse.m2e.core.internal.project.registry.MavenProjectManager.refresh(MavenProjectManager.java:58)
at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:87)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:726)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
會話數據:
eclipse.buildId=M20130204-1200
java.version=1.7.0_17
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product
我看不到與配置的任何問題。其他人已經檢查出這個項目沒有這個錯誤。當它說'路徑必須包含...'時,我不知道它指的是什麼,我可以在哪裏配置此路徑?
您是否嘗試過在Eclipse中右鍵單擊項目並選擇Maven> Update Dependencies並選擇所有項目? – maloney 2013-03-26 11:10:44
這不是一個單獨的項目,它作爲4個獨立的Java項目簽出。我試着右鍵點擊其中一個,然後選擇'Maven'。我沒有'Maven'下的'Update Dependencies'選項,我只有'更新項目'。當我做'更新項目'時,我得到相同的錯誤 – eeijlar 2013-03-26 11:16:27
很難說,沒有看,但聽起來像檢查出4個獨立的項目有問題 - 你還需要有一個根項目,你檢查了這一點嗎?如果其他人已經成功檢查了這一點,那麼你一定做了一些不同的事情,所以試圖比較你的工作空間 – maloney 2013-03-26 11:29:22