【发布时间】:2014-01-09 18:06:33
【问题描述】:
我对 Maven 和 Spring MVC 完全陌生。我要做的是建立一个新的 Spring MVC 项目,使用 Maven(希望这句话有意义),并使用 Eclipse 在 Tomcat 上运行我的 Web 应用程序。
我正在关注此链接上的教程,但 pom.xml 文件有问题:
本教程要求创建文件夹结构,并创建一个 pom.xml 文件。对于初学者,他们要求将这一行放在 pom.xml 中:
xml 4.0.0org.springsource.greenbeans.mavenexample11.0-SNAPSHOTOur Simple Project
但是当我这样做时,我的 Eclipse 会抛出一个错误:
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project (D:\projectName\pom.xml) has 1 error
[ERROR] Non-parseable POM D:\projectName\pom.xml: only whitespace content allowed before start tag and not ` (position: START_DOCUMENT seen `... @1:1) @ line 1, column 1 -> [Help 2]
[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
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException
你知道 pom.xml 的最小值是多少吗?我尝试了很多东西,但它对我不起作用......
【问题讨论】:
标签: java eclipse spring maven pom.xml