D:\code\maven01\src\main\java\com\imooc\maven01\model
里面有java文件如下
package com.imooc.maven01.model;
public class HelloWorld{
public String sayHello(){
return "Hello World";
}
}
D:\code\maven01\src\test\java\com\imooc\maven01\model
import org.junit.*;
import org.junit.Assert.*;
public class HelloWorldTest{
@Test
public void testHello(){
Assert.assertEquals("Hello World!",new HelloWorld().sayHello());
}
}
有导入junit包了
D:\code\maven01>mvn compile
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-parseable POM D:\code\maven01\pom.xml: expected = after attribute na
me (position: START_DOCUMENT seen ....0.0" xmlns:xsi="http://www.w3.org/2001/XML
Schema-instance" xsi:\ns... @4:2) @ line 4, column 2
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project (D:\code\maven01\pom.xml) has 1 error
[ERROR] Non-parseable POM D:\code\maven01\pom.xml: expected = after attribut
e name (position: START_DOCUMENT seen ....0.0" xmlns:xsi="http://www.w3.org/2001
/XMLSchema-instance" xsi:\ns... @4:2) @ line 4, column 2 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildin
gException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseExce
ption
编译错误