今天学习Maven的时候,因为是跟随的b站上的javaweb的一个课程,当up主直接复制pom.xml文件时。视频前的大家都傻眼了。。。于是老实人只能手敲上去。。
但是在编译阶段就出了大问题。
[INFO] Scanning for projects... [ERROR] [ERROR] Some problems were encountered while processing the POMs: [FATAL] Non-parseable POM C:Usersadmin.m2repositoryorgspringframeworkcloudspring-cloud-config-dependencies2.0.0.RELEASEspring-cloud-config-dependencies-2.0.0.RELEASE.pom: processing instruction can not have PITarget with reserved xml name (position: END_TAG seen ...nnnnnnn [Help 1] [ERROR] [ERROR] The project com.aikucun:logistics:1.0-SNAPSHOT (D:workspace_aikucunlogisticspom.xml) has 5 errors [ERROR] Non-parseable POM C:Usersadmin.m2repositoryorgspringframeworkcloudspring-cloud-config-dependencies2.0.0.RELEASEspring-cloud-config-dependencies-2.0.0.RELEASE.pom: processing instruction can not have PITarget with reserved xml name (position: END_TAG seen ...nn [Help 2] [ERROR] Non-parseable POM C:Usersadmin.m2repositoryorgspringframeworkcloudspring-cloud-vault-dependencies2.0.0.RELEASEspring-cloud-vault-dependencies-2.0.0.RELEASE.pom: processing instruction can not have PITarget with reserved xml name (position: END_TAG seen ...nnn [Help 2] [ERROR] Non-parseable POM C:Usersadmin.m2repositoryorgspringframeworkcloudspring-cloud-security-dependencies2.0.0.RELEASEspring-cloud-security-dependencies-2.0.0.RELEASE.pom: processing instruction can not have PITarget with reserved xml name (position: END_TAG seen ...nn [Help 2] [ERROR] 'dependencies.dependency.version' for org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:jar is missing. @ line 45, column 21 [ERROR] 'dependencies.dependency.version' for org.springframework.cloud:spring-cloud-starter-openfeign:jar is missing. @ line 49, column 21 [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/ModelParseExceptio
百思不得其解,到CSDN查询过后,发现是pom.xml文件配置错误,看了很多博主的解决办法, 只有一个给我看进去了。因为我本身知道自己是手敲的,可能会存在问题,于是果断选择寻找原始pom.xml文件
寻找结果如下:
4.0.0 //groupId是你这个maven项目的id,需要改成相同的名称。com.xxxx SSM_Stuct1.0-SNAPSHOT
经配置过后,编译结果。
E:javaMavenmaven01>mvn compile [INFO] Scanning for projects... [INFO] [INFO] -------------------------< com.xxxx:SSM_Stuct >------------------------- [INFO] Building SSM_Stuct 1.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ SSM_Stuct --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ SSM_Stuct --- [INFO] Nothing to compile - all classes are up to date [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.399 s [INFO] Finished at: 2021-12-02T10:49:54+08:00 [INFO] ------------------------------------------------------------------------



