解决:[ERROR] Error executing Maven. [ERROR] 1 problem was encountered while building the effective set
程序员文章站
2022-07-14 17:05:42
...
maven编译 Process terminated【已解决】
解决:[ERROR] Error executing Maven. [ERROR] 1 problem was encountered while building the effective set
我出现这个问题的原因是因为maven文件目录下得conf文件下得settings.xml文件配置出现问题,我在添加中心仓库的时候添加的字段中,注释括号出现了问题:
这里是正确的配置代码:
<mirrors>
<!-- mirror
| Specifies a repository mirror site to use instead of a given repository. The repository that
| this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
| for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
|
-->
<!-- 阿里云仓库 -->
<mirror>
<id>alimaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
</mirror>
<!-- *仓库1 -->
<mirror>
<id>repo1</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo1.maven.org/maven2/</url>
</mirror>
<!-- *仓库2 -->
<mirror>
<id>repo2</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo2.maven.org/maven2/</url>
</mirror>
<mirror>
<id>mirrorId</id>
<mirrorOf>repositoryId</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://my.repository.com/repo/path</url>
</mirror>
</mirrors>
注释位置添加错误,代码一中的–>应该填在代码二中:
代码一:
</mirror>
-->
</mirrors>
代码二:
unique across the set of mirrors.
|
-->
<!-- 阿里云仓库 -->
<mirror>
总之就是添加仓库路劲时把<mirror></mirror>
添加到了一个<!-- -->
之中,导致系统无法识别被注释的内容究竟是哪一块儿,所以报错。
上一篇: 拖拽图片去任意位置