2 j2merr j2merr 于 2014.12.09 11:06 提问

maven 编译报错的问题

错误如下:

[root@node1-246 emm-trunk01]# mvn clean install
[INFO] Scanning for projects...
[ERROR] The build could not read 8 projects -> [Help 1]
[ERROR]

[ERROR] The project com.polysaas.emm:emm-device:0.0.1-SNAPSHOT (/opt/emm-trunk01/emm-device/pom.xml) has 5 errors
[ERROR] Non-parseable POM /root/.m2/repository/org/springframework/boot/spring-boot-starter-parent/1.0.1.RELEASE/spring-boot-starter-parent-1.0.1.RELEASE.pom: start tag unexpected character ; (position: TEXT seen ...,window.analytics}};for(var i=0;i [Help 2]
[ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-web:jar is missing. @ com.polysaas.emm:emm-device:[unknown-version], /opt/emm-trunk01/emm-device/pom.xml, line 50, column 15
[ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-jetty:jar is missing. @ com.polysaas.emm:emm-device:[unknown-version], /opt/emm-trunk01/emm-device/pom.xml, line 60, column 15
[ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-actuator:jar is missing. @ com.polysaas.emm:emm-device:[unknown-version], /opt/emm-trunk01/emm-device/pom.xml, line 64, column 15
[ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-test:jar is missing. @ com.polysaas.emm:emm-device:[unknown-version], /opt/emm-trunk01/emm-device/pom.xml, line 68, column 15
[ERROR]

[ERROR] The project com.polysaas.emm:emm-pms:0.0.1-SNAPSHOT (/opt/emm-trunk01/emm-pms/pom.xml) has 5 errors
[ERROR] Non-parseable POM /root/.m2/repository/org/springframework/boot/spring-boot-starter-parent/1.1.7.RELEASE/spring-boot-starter-parent-1.1.7.RELEASE.pom: start tag unexpected character ; (position: TEXT seen ...,window.analytics}};for(var i=0;i [Help 2]

代码是从svn上down下来的,在其他机器上编译没问题,新装的机器上 编译出错了,maven 用3.0.4 和 3.0.5 都是这个问题(maven是解压指定目录的),linux下maven的设置如下:
MAVEN_HOME=/opt/maven
PATH=$MAVEN_HOME/bin:$PATH
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL EMM_LOG_BASE EMM_LOG_BASE MAVEN_HOME

谢谢!

3个回答

eagleyan
eagleyan   Rxr 2014.12.09 12:51

检查你的pom.xml, org.springframework.boot缺了version


org.springframework.boot
spring-boot-starter-tomcat
1.1.9.RELEASE

j2merr
j2merr 谢谢,可同样的代码,在别的机器上是可以编译通过,能运行的
大约 3 年之前 回复
u013038643
u013038643   2017.02.12 21:47

是缺少吗?

zzhao114
zzhao114   2017.02.12 22:03

....好久远的帖子。。

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!