2

这里有几个非常相似的问题,除了它们与 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

我正在运行日食 Helios;GWT 2.5、java 1.6.0_45、Windows 7、64 位。

4

1 回答 1

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
于 2016-11-06T01:33:10.797 回答