maven-resources-plugin 报错问题解决

发布于:2023-07-04 ⋅ 阅读:(174) ⋅ 点赞:(0)

eclipse新配了Maven环境,在导入新项目报了maven-resources-plugin错误

在网上查了之后找到解决办法:

在Maven的conf文件夹下找到setting文件,在里面找到<mirrors>标签,添加一个maven的仓库地址:

<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>mirrorId</id>
      <mirrorOf>repositoryId</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://my.repository.com/repo/path</url>
    </mirror>
     -->
	 //以上是注释的部分
     //以下是添加的内容:
	<mirror>
		<id>Central</id>
		<url>http://repo1.maven.org/maven2</url>
		<mirrorOf>central</mirrorOf>
	</mirror>
  </mirrors>

重新updateMaven项目,问题解决!!!