plugin:2.2 or 无法解析它的一个依赖项

k4aesqcs  于 2021-07-03  发布在  Java
关注(0)|答案(0)|浏览(302)

我在mvn clean verify tomcat7:run上不断遇到这个错误。我尝试了这个命令来解析“mvn-dhttps.protocols=tlsv1.2 clean install”,但没有得到解决
错误

[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run (default-cli) on project fmissampletestdriver: Execution default-cli of goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run failed: Plugin org.apache.tomcat.maven:tomcat7-maven-plugin:2.2 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.tomcat.maven:tomcat7-maven-plugin:jar:2.2 -> org.apache.tomcat.embed:tomcat-embed-core:jar:7.0.47: Failed to read artifact descriptor for org.apache.tomcat.embed:tomcat-embed-core:jar:7.0.47: Could not transfer artifact org.apache.tomcat.embed:tomcat-embed-core:pom:7.0.47 from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/7.0.47/tomcat-embed-core-7.0.47.pom: Received fatal alert: protocol_version -> [Help 1]

命令提示输出

Microsoft Windows [Version 10.0.18363.1256]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\aksha>cd C:\Users\aksha\fmis-sample-test-driver

C:\Users\aksha\fmis-sample-test-driver>mvn clean verify tomcat7:run
[INFO] Scanning for projects...
[INFO]
[INFO] --------------< com.ncrcoe.di.test:fmissampletestdriver >---------------
[INFO] Building Test Driver for Sample TPV 0.0.1-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ fmissampletestdriver ---
[INFO] Deleting C:\Users\aksha\fmis-sample-test-driver\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ fmissampletestdriver ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ fmissampletestdriver ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 6 source files to C:\Users\aksha\fmis-sample-test-driver\target\classes
[WARNING] /C:/Users/aksha/fmis-sample-test-driver/src/main/java/com/ncr/di/genenveloped/util/DocumentSigner.java: C:\Users\aksha\fmis-sample-test-driver\src\main\java\com\ncr\di\genenveloped\util\DocumentSigner.java uses unchecked or unsafe operations.
[WARNING] /C:/Users/aksha/fmis-sample-test-driver/src/main/java/com/ncr/di/genenveloped/util/DocumentSigner.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ fmissampletestdriver ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ fmissampletestdriver ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 5 source files to C:\Users\aksha\fmis-sample-test-driver\target\test-classes
[WARNING] /C:/Users/aksha/fmis-sample-test-driver/src/test/java/com/ncr/di/genenveloped/util/ResponseSenderTest.java:[5,24] sun.net.www.http.PosterOutputStream is internal proprietary API and may be removed in a future release
[WARNING] /C:/Users/aksha/fmis-sample-test-driver/src/test/java/com/ncr/di/genenveloped/util/ResponseSenderTest.java:[66,15] sun.net.www.http.PosterOutputStream is internal proprietary API and may be removed in a future release
[WARNING] /C:/Users/aksha/fmis-sample-test-driver/src/test/java/com/ncr/di/genenveloped/util/ResponseSenderTest.java:[66,56] sun.net.www.http.PosterOutputStream is internal proprietary API and may be removed in a future release
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ fmissampletestdriver ---
[INFO] Surefire report directory: C:\Users\aksha\fmis-sample-test-driver\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.ncr.di.genenveloped.data.AssertionTest
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.601 sec
Running com.ncr.di.genenveloped.data.SAMLResponseTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.548 sec
Running com.ncr.di.genenveloped.util.DocumentSignerTest
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.305 sec
Running com.ncr.di.genenveloped.util.ResponseSenderTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.232 sec

Results :

Tests run: 31, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- maven-war-plugin:2.5:war (default-war) @ fmissampletestdriver ---
[INFO] Packaging webapp
[INFO] Assembling webapp [fmissampletestdriver] in [C:\Users\aksha\fmis-sample-test-driver\target\fmisSampleTestDriver]
[INFO] Processing war project
[INFO] Copying webapp resources [C:\Users\aksha\fmis-sample-test-driver\src\main\webapp]
[INFO] Webapp assembled in [296 msecs]
[INFO] Building war: C:\Users\aksha\fmis-sample-test-driver\target\fmisSampleTestDriver.war
[INFO]
[INFO] >>> tomcat7-maven-plugin:2.2:run (default-cli) > process-classes @ fmissampletestdriver >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ fmissampletestdriver ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ fmissampletestdriver ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< tomcat7-maven-plugin:2.2:run (default-cli) < process-classes @ fmissampletestdriver <<<
[INFO]
[INFO]
[INFO] --- tomcat7-maven-plugin:2.2:run (default-cli) @ fmissampletestdriver ---
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/7.0.47/tomcat-embed-core-7.0.47.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-util/7.0.47/tomcat-util-7.0.47.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-coyote/7.0.47/tomcat-coyote-7.0.47.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-api/7.0.47/tomcat-api-7.0.47.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-jdbc/7.0.47/tomcat-jdbc-7.0.47.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-dbcp/7.0.47/tomcat-dbcp-7.0.47.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-servlet-api/7.0.47/tomcat-servlet-api-7.0.47.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-jsp-api/7.0.47/tomcat-jsp-api-7.0.47.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-jasper/7.0.47/tomcat-jasper-7.0.47.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-jasper-el/7.0.47/tomcat-jasper-el-7.0.47.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-el-api/7.0.47/tomcat-el-api-7.0.47.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-catalina/7.0.47/tomcat-catalina-7.0.47.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-tribes/7.0.47/tomcat-tribes-7.0.47.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-catalina-ha/7.0.47/tomcat-catalina-ha-7.0.47.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/7.0.47/tomcat-annotations-api-7.0.47.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-juli/7.0.47/tomcat-juli-7.0.47.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-logging-juli/7.0.47/tomcat-embed-logging-juli-7.0.47.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-logging-log4j/7.0.47/tomcat-embed-logging-log4j-7.0.47.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/eclipse/jdt/core/compiler/ecj/4.2.2/ecj-4.2.2.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/tomcat/maven/common-tomcat-maven-plugin/2.2/common-tomcat-maven-plugin-2.2.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/tomcat/maven/tomcat7-war-runner/2.2/tomcat7-war-runner-2.2.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/maven-archiver/2.4.2/maven-archiver-2.4.2.pom
Downloading from central: https://repo.maven.apache.org/maven2/commons-lang/commons-lang/2.6/commons-lang-2.6.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/commons/commons-compress/1.4.1/commons-compress-1.4.1.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-archiver/2.1.1/plexus-archiver-2.1.1.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.15/plexus-utils-3.0.15.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-filtering/1.0/maven-filtering-1.0.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/slf4j/jcl-over-slf4j/1.7.5/jcl-over-slf4j-1.7.5.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  38.709 s
[INFO] Finished at: 2020-12-16T18:10:03+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run (default-cli) on project fmissampletestdriver: Execution default-cli of goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run failed: Plugin org.apache.tomcat.maven:tomcat7-maven-plugin:2.2 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.tomcat.maven:tomcat7-maven-plugin:jar:2.2 -> org.apache.tomcat.embed:tomcat-embed-core:jar:7.0.47: Failed to read artifact descriptor for org.apache.tomcat.embed:tomcat-embed-core:jar:7.0.47: Could not transfer artifact org.apache.tomcat.embed:tomcat-embed-core:pom:7.0.47 from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/7.0.47/tomcat-embed-core-7.0.47.pom: Received fatal alert: protocol_version -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

C:\Users\aksha\fmis-sample-test-driver>

pom.xml文件

<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.ncrcoe.di.test</groupId>
    <artifactId>fmissampletestdriver</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>war</packaging>
    <name>Test Driver for Sample TPV</name>
    <url>http://maven.apache.org</url>
    <properties>
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>
    </properties>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.10</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.4</version>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>1.10.8</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.0.1</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
    <build>
        <finalName>fmisSampleTestDriver</finalName>
        <plugins>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <port>9090</port>
                    <path>/</path>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题