Element ‘configuration’ cannot have character [children], because the type’s content type is element

时间:2024-05-20 08:29:01

配置maven-release-plugin的时候,configuration报红

提示信息:Element ‘configuration’ cannot have character [children], because the type’s content type is element

导致报红的原因是:

<configuration></configuration>标签内配置的内容中,beans节点下面只能是元素节点,不能有字符或者文本存在

意思就是:配置的内容中存在多余的标点符号:逗号,  或者.  也有可能是空格(我的就是因为空格导致的报红)

只要去掉多余的空格即可

Element ‘configuration’ cannot have character [children], because the type’s content type is element

 

成功解决报红问题