Element 'repository' cannot have character [children], because the type's content type is element-only.

出错现象

 由于代码是网络上拷贝来的,可能存在特殊字符,在进行maven打包的时候报错

[ERROR] Malformed POM F:ai开放平台SRCweb知识产权申请pom.xml: expected ST
ART_TAG or END_TAG not TEXT (position: TEXT seen ...<repository> ua0 ua0ua0 ua0<i... @479:19) @ F:ai开放平台SRCweb知识产权申请pom.xml, lin

后来在notepad中显示所有字符,后面的确有一些不可见字符,可能是网络上编辑器自动生成的,如下图

 解决方法,把上面正确的节点复制一份,往里面填写数据

打包成功

 参考来源:https://blog.csdn.net/m0_37172806/article/details/77477459

原文地址:https://www.cnblogs.com/passedbylove/p/11886893.html