NeQrhk 2016-04-17 14:00 采纳率: 30.6%
浏览 1818

maven问题,编译错误,谁帮忙看下谢了

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

编译错误

  • 写回答

2条回答

  • devmiao 2016-04-17 21:11
    关注
    评论

报告相同问题?

悬赏问题

  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮