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

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
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#java#的问题,请各位专家解答!
  • ¥15 急matlab编程仿真二阶震荡系统
  • ¥20 TEC-9的数据通路实验
  • ¥15 ue5 .3之前好好的现在只要是激活关卡就会崩溃
  • ¥50 MATLAB实现圆柱体容器内球形颗粒堆积
  • ¥15 python如何将动态的多个子列表,拼接后进行集合的交集
  • ¥20 vitis-ai量化基于pytorch框架下的yolov5模型
  • ¥15 如何实现H5在QQ平台上的二次分享卡片效果?
  • ¥30 求解达问题(有红包)
  • ¥15 请解包一个pak文件