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

无法解析Eclipse Maven Version-3.6.1中的maven-resources-plugin:2.19.1依赖项

宗政永望
2023-03-14

获取以下错误消息-无法计算生成计划:Plugin org.apache.maven.plugins:maven-resources-plugin:2.19.1或其依赖项之一无法解析:无法读取org.apache.maven.plugins:maven-resources-plugin:jar:2.19.1的工件描述符

pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<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>com.qmetry</groupId>
    <artifactId>quantum-starter</artifactId>
    <version>2.0-SNAPSHOT</version>

    <properties>
        <testngXmlDir>src/main/resources/config</testngXmlDir>
        <testngXmlFile>localRegressionTest.xml</testngXmlFile>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <reportium-sdk.version>2.2.1</reportium-sdk.version>
        <testng.version>6.10</testng.version>
        <cukes.version>1.2.5</cukes.version>
        <qaf.version>2.1.14</qaf.version>
        <qafsupport.version>2.1.14</qafsupport.version>
        <quantum.version>1.19</quantum.version>
        <org.json.version>20160810</org.json.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    </properties>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.5.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>          
                <version>2.19.1</version>
                <configuration>
                    <argLine>-Dfile.encoding=${project.build.sourceEncoding}</argLine>
                    <systemPropertyVariables>
                        <application.properties.file>resources/application.properties</application.properties.file>
                    </systemPropertyVariables>

                    <suiteXmlFiles>
                        <suiteXmlFile>${testngXmlDir}/${testngXmlFile}</suiteXmlFile>
                    </suiteXmlFiles>

                </configuration>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>perfectomobile</id>
            <name>Perfecto mobile</name>
            <url>https://repo1.perfectomobile.com/public/repositories/maven</url>
        </repository>
        <repository>
            <id>jai</id>
            <url>https://repository.jboss.org/nexus/content/repositories/thirdparty-releases</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <version>1.3</version>
            <exclusions>
                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>selenium-remote-driver</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>selenium-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>selenium-java</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>
        <dependency>
            <groupId>xml-apis</groupId>
            <artifactId>xml-apis</artifactId>
            <version>1.4.01</version>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-java</artifactId>
            <version>${cukes.version}</version>
        </dependency>
        <dependency>
            <groupId>com.quantum</groupId>
            <artifactId>quantum-support</artifactId>
            <version>${quantum.version}</version>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>${testng.version}</version>
        </dependency>
        <dependency>
            <groupId>com.perfecto.reporting-sdk</groupId>
            <artifactId>reportium-testng</artifactId>
            <version>${reportium-sdk.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.7</version>
        </dependency>
        <!-- Added -->

        <dependency>
            <groupId>com.qmetry</groupId>
            <artifactId>qaf</artifactId>
            <version>${qaf.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>selenium-remote-driver</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>selenium-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>selenium-java</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.qmetry</groupId>
            <artifactId>qaf-support</artifactId>
            <version>${qafsupport.version}</version>
        </dependency>

        <dependency>
            <groupId>io.appium</groupId>
            <artifactId>java-client</artifactId>
            <version>6.1.0 </version>
        </dependency>
    </dependencies>
</project>

错误日志:

Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.19.1 or one 
of its dependencies could not be resolved: Failed to read artifact descriptor for 
org.apache.maven.plugins:maven-resources-plugin:jar:2.19.1
org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.maven.plugins:maven-resources-plugin:2.19.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.19.1
    at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:117)
    at org.eclipse.m2e.core.internal.project.registry.EclipsePluginDependenciesResolver.resolve(EclipsePluginDependenciesResolver.java:47)
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:179)
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:284)
    at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:241)
    at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecution(DefaultLifecycleExecutionPlanCalculator.java:169)
    at org.eclipse.m2e.core.internal.embedder.MavenImpl.setupMojoExecution(MavenImpl.java:408)
    at org.eclipse.m2e.core.internal.embedder.MavenImpl$2.call(MavenImpl.java:420)
    at org.eclipse.m2e.core.internal.embedder.MavenImpl$2.call(MavenImpl.java:1)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
    at org.eclipse.m2e.core.internal.embedder.MavenImpl.setupMojoExecution(MavenImpl.java:418)
    at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.setupMojoExecution(ProjectRegistryManager.java:961)
    at org.eclipse.m2e.core.internal.project.registry.MavenProjectFacade.getMojoExecution(MavenProjectFacade.java:408)
    at org.eclipse.m2e.core.project.configurator.AbstractCustomizableLifecycleMapping.getBuildParticipants(AbstractCustomizableLifecycleMapping.java:66)
    at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1$1.call(MavenBuilder.java:113)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
    at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:105)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
    at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86)
    at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.19.1
    at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:282)
    at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:198)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:287)
    at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:103)
    ... 35 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.19.1 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.plugins:maven-resources-plugin:pom:2.19.1 from/to central (https://repo.maven.apache.org/maven2): unexpected end of stream on Connection{repo.maven.apache.org:443, proxy=HTTP @ vmproxy.virginmedia.co.uk/172.19.41.40:8080 hostAddress=172.19.41.40 cipherSuite=none protocol=http/1.1} (recycle count=0)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
    at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:267)
    ... 38 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.19.1 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.plugins:maven-resources-plugin:pom:2.19.1 from/to central (https://repo.maven.apache.org/maven2): unexpected end of stream on Connection{repo.maven.apache.org:443, proxy=HTTP @ vmproxy.virginmedia.co.uk/172.19.41.40:8080 hostAddress=172.19.41.40 cipherSuite=none protocol=http/1.1} (recycle count=0)
    at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:238)
    at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:206)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:585)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:503)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
    ... 41 more

共有1个答案

阎星华
2023-03-14

maven-resources-plugin版本2.1.9.1不存在。

尝试将版本更改为3.1.0(或其他现有版本)

您可以在这里检查实际存在哪些工件(和版本):

 类似资料:
  • 我遵循以下指南 问题是,当我创建项目时,它有这个错误。这是我的pom.xml 这是生成错误: 无法解析插件org.apache.maven.plugins:maven-resources-plugin:2.6或其依赖项之一:无法读取org.apache.maven.plugins:maven-resources-plugin:jar:2.6:无法将项目org.apache.maven.plugin

  • 我试图在7月11日版本的netbeans-11上运行我的第一个项目“Calculator”,但它给出了这个错误- Plugin org.codehaus.mojo:exec-maven-plugin:1.5.0或它的一个依赖项无法解析:无法读取org.codehaus.mojo:exec-maven-plugin:jar:1.5.0:无法将工件org.codehaus.mojo:exec-mave

  • 现在,我在Maven中显示的依赖项上出现了错误。 我尝试过这里列出的Intellij idea无法解决maven中的任何问题,例如更改maven主目录和自动选择Import maven。我不确定还能是什么。。。此外,该项目最初是在Eclipse中完成的。

  • 我已经在pom中配置了本地maven存储库。xml。当我构建项目时,它会显示依赖项下载错误(请参阅下面的日志)。Maven正在尝试从我的本地Maven存储库下载所有依赖项。 日志 这是我的pom。xml文件 本地存储库是http://XXX。XXX。XX。XXX:8081/artifactory/libs本地发布 xml。背景

  • 我希望有人面对同样的问题来解决依赖。下面提到的文件 xsi:schemalocation=“http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd”xmlns=“http://maven.apache.org/pom/4.0.0”xmlns:xsi=“http://www.w3.org/2001/x