这个日食错误意味着什么:“项目的路径必须只有一个部分”?

时间:2013-08-20 18:54:37

标签: eclipse gwt

这里有几个非常相似的问题,除了它们与Android运行/调试配置有关。我正在尝试配置GWT应用程序。当我尝试保存属性中的更改时,我收到此错误。具体来说,在项目属性UI中,我在Google-> Web应用程序中,我正在尝试取消选中“从此目录启动和部署”。我检查了“此项目有一个WAR目录”属性,并在“WAR目录”框中有一个有效文件夹。

错误说要检查eclipse错误日志以获取更多详细信息,所以我做了,但在那里没什么帮助。这是堆栈跟踪中的前几行:

java.lang.IllegalArgumentException: Path for project must have only one segment.
at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
at org.eclipse.core.internal.resources.WorkspaceRoot.getProject(WorkspaceRoot.java:183)
at org.eclipse.jdt.internal.core.JavaModel.getJavaProject(JavaModel.java:189)
at org.eclipse.jdt.launching.JavaRuntime.getJavaProject(JavaRuntime.java:1229)
at com.google.gdt.eclipse.core.launch.LaunchConfigurationUtilities.getJavaProject(LaunchConfigurationUtilities.java:83)
at com.google.gdt.eclipse.core.launch.LaunchConfigurationUtilities.getLaunchConfigurations(LaunchConfigurationUtilities.java:102)
at com.google.gdt.eclipse.suite.launch.processors.LaunchConfigAffectingChangesListener.updateLaunchConfigs(LaunchConfigAffectingChangesListener.java:248)
at com.google.gdt.eclipse.suite.launch.processors.LaunchConfigAffectingChangesListener.updateLaunchConfigurations(LaunchConfigAffectingChangesListener.java:238)
at com.google.gdt.eclipse.suite.launch.processors.LaunchConfigAffectingChangesListener.warOutLocationChanged(LaunchConfigAffectingChangesListener.java:243)
at com.google.gdt.eclipse.core.properties.WebAppProjectProperties.notifyWarOutLocationChangedListeners(WebAppProjectProperties.java:236)
at com.google.gdt.eclipse.core.properties.WebAppProjectProperties.setWarSrcDir(WebAppProjectProperties.java:208)
at com.google.gdt.eclipse.core.properties.ui.WebappProjectPropertyPage.saveProjectProperties(WebappProjectPropertyPage.java:216)
at com.google.gdt.eclipse.core.ui.AbstractProjectPropertyPage.performOk(AbstractProjectPropertyPage.java:77)

我的工作区路径没有空格;它是C:\ projects \ eclipse \ workspaces \ MyProjectHasNoSpaces

我正在运行eclipse Helios; GWT 2.5,java 1.6.0_45,Windows 7,64位。

1 个答案:

答案 0 :(得分:1)

Eclipse项目导入器有时会提供无用的通用错误消息。获得真正错误的可预测方法是打开终端窗口并执行“mvn clean compile”或类似的操作。然后你可能会看到更具体的消息:

Users/amrinder/xyz> mvn clean compile
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project xyzabc:[unknown-artifact-id]:1.0 (/Users/amrinder/xyzabc/pom.xml) has 1 error
[ERROR]     'artifactId' is missing. @ line 5, column 15
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException