当前位置: 首页 > 知识库问答 >
问题:

执行默认资源的目标org.apache.maven.plugins: maven-resource-plugin: 2.6:资源失败

扶冠宇
2023-03-14

我正在尝试用eclipse和Maven设置一个Dicord Bot。问题是,我每次都会出现2个错误,似乎没有什么工作。

我尝试了这篇帖子中的所有内容:Maven:未能执行目标组织。阿帕奇。专家插件:maven资源插件:2.7:资源

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>dsdsds</groupId>
  <artifactId>dsdsds</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <build>
    <sourceDirectory>src</sourceDirectory>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.0</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

这是错误消息:

Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources failed: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.6, org.apache.maven.reporting:maven-reporting-api:jar:2.0.6, org.apache.maven.doxia:doxia-sink-api:jar:1.0-alpha-7, org.apache.maven:maven-repository-metadata:jar:2.0.6, org.apache.maven:maven-error-diagnostics:jar:2.0.6, commons-cli:commons-cli:jar:1.0, org.apache.maven:maven-plugin-descriptor:jar:2.0.6, org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4, classworlds:classworlds:jar:1.1, org.apache.maven:maven-artifact:jar:2.0.6, org.apache.maven:maven-settings:jar:2.0.6, org.apache.maven:maven-model:jar:2.0.6, org.apache.maven:maven-monitor:jar:2.0.6, org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1, junit:junit:jar:3.8.1, org.codehaus.plexus:plexus-utils:jar:2.0.5, org.apache.maven.shared:maven-filtering:jar:1.1, org.sonatype.plexus:plexus-build-api:jar:0.0.4, org.codehaus.plexus:plexus-interpolation:jar:1.13: Failure to transfer org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.6 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.6 from/to central (https://repo.maven.apache.org/maven2): The operation was cancelled. (org.apache.maven.plugins:maven-resources-plugin:2.6:resources:default-resources:process-resources)

org.apache.maven.plugin.PluginExecutionException: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources failed: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.6, org.apache.maven.reporting:maven-reporting-api:jar:2.0.6, org.apache.maven.doxia:doxia-sink-api:jar:1.0-alpha-7, org.apache.maven:maven-repository-metadata:jar:2.0.6, org.apache.maven:maven-error-diagnostics:jar:2.0.6, commons-cli:commons-cli:jar:1.0, org.apache.maven:maven-plugin-descriptor:jar:2.0.6, org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4, classworlds:classworlds:jar:1.1, org.apache.maven:maven-artifact:jar:2.0.6, org.apache.maven:maven-settings:jar:2.0.6, org.apache.maven:maven-model:jar:2.0.6, org.apache.maven:maven-monitor:jar:2.0.6, org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1, junit:junit:jar:3.8.1, org.codehaus.plexus:plexus-utils:jar:2.0.5, org.apache.maven.shared:maven-filtering:jar:1.1, org.sonatype.plexus:plexus-build-api:jar:0.0.4, org.codehaus.plexus:plexus-interpolation:jar:1.13: Failure to transfer org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.6 from https://repo.maven.apache...

Execution default-testResources of goal org.apache.maven.plugins:maven-resources-plugin:2.6:testResources failed: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.6, org.apache.maven.reporting:maven-reporting-api:jar:2.0.6, org.apache.maven.doxia:doxia-sink-api:jar:1.0-alpha-7, org.apache.maven:maven-repository-metadata:jar:2.0.6, org.apache.maven:maven-error-diagnostics:jar:2.0.6, commons-cli:commons-cli:jar:1.0, org.apache.maven:maven-plugin-descriptor:jar:2.0.6, org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4, classworlds:classworlds:jar:1.1, org.apache.maven:maven-artifact:jar:2.0.6, org.apache.maven:maven-settings:jar:2.0.6, org.apache.maven:maven-model:jar:2.0.6, org.apache.maven:maven-monitor:jar:2.0.6, org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1, junit:junit:jar:3.8.1, org.codehaus.plexus:plexus-utils:jar:2.0.5, org.apache.maven.shared:maven-filtering:jar:1.1, org.sonatype.plexus:plexus-build-api:jar:0.0.4, org.codehaus.plexus:plexus-interpolation:jar:1.13: Failure to transfer org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.6 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.6 from/to central (https://repo.maven.apache.org/maven2): The operation was cancelled. (org.apache.maven.plugins:maven-resources-plugin:2.6:testResources:default-testResources:process-test-resources)

org.apache.maven.plugin.PluginExecutionException: Execution default-testResources of goal org.apache.maven.plugins:maven-resources-plugin:2.6:testResources failed: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.6, org.apache.maven.reporting:maven-reporting-api:jar:2.0.6, org.apache.maven.doxia:doxia-sink-api:jar:1.0-alpha-7, org.apache.maven:maven-repository-metadata:jar:2.0.6, org.apache.maven:maven-error-diagnostics:jar:2.0.6, commons-cli:commons-cli:jar:1.0, org.apache.maven:maven-plugin-descriptor:jar:2.0.6, org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4, classworlds:classworlds:jar:1.1, org.apache.maven:maven-artifact:jar:2.0.6, org.apache.maven:maven-settings:jar:2.0.6, org.apache.maven:maven-model:jar:2.0.6, org.apache.maven:maven-monitor:jar:2.0.6, org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1, junit:junit:jar:3.8.1, org.codehaus.plexus:plexus-utils:jar:2.0.5, org.apache.maven.shared:maven-filtering:jar:1.1, org.sonatype.plexus:plexus-build-api:jar:0.0.4, org.codehaus.plexus:plexus-interpolation:jar:1.13: Failure to transfer org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.6 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.6 from/to central (https://repo.maven.apache.org/maven2): The operation was cancelled.

Eclipse在末尾显示一个错误:xsi: Schema位置="http://maven.apache.org/POM/4.0.0http://maven.apache.org/xsd/maven-4.0.0.xsd"

谢谢你的帮助。


共有1个答案

颜新
2023-03-14

是的,好的,我找到了解决办法。

我删除了。%USERPROFILE%中的m2文件夹,并更新了项目。

 类似资料: