第三课时,完全按照视频步骤做,会报错,还没找到解决方法。错误代码如下
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.imooc.maven01</groupId> <artifactId>maven01-model</artifactId> <version>0.0.1-SHAPSHOT</version> <dependencies> <dependency> <groupId>juntil</groupId> <artifactId>juntil</artifactId> <version>4.10</version> </dependency> </dependencies> </project>
pom.xml如上所示
在命令行中找到项目所在位置 运行mvn compile后出现以下错误
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-parseable POM E:\code\maven01\pom.xml: only whitespace content allowed before start tag and not / (position: START_DOCUMENT seen <?xml version="1.0" encoding="UTF-8"?>\n/... @2:2) @ line 2, column 2
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project (E:\code\maven01\pom.xml) has 1 error
[ERROR] Non-parseable POM E:\code\maven01\pom.xml: only whitespace content allowed before start tag and not / (position: START_DOCUMENT seen <?xml version="1.0" encoding="UTF-8"?>\n/... @2:2) @ line 2, column 2 -> [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