栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

学习javaweb中关于配置编写Maven原始pom.xml文件

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

学习javaweb中关于配置编写Maven原始pom.xml文件

今天学习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_Stuct
    1.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] ------------------------------------------------------------------------
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/631650.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号