maven build 出现Failed to execute goal org.apache.tomcat.maven:

自欺欺你 发布于 2018/07/10 15:02
阅读 2K+
收藏 0

myeclipse集成maven build后出现这个问题,一直找不到原因,把maven重装还是一样问题,网上找的方法都没用,是不是我安装出了什么问题?另外其他插件也是不停出问题。

[INFO] Scanning for projects...
[INFO] 
[INFO] --------------------------< com.lzh:TestSSM1 >--------------------------
[INFO] Building TestSSM1 Maven Webapp 0.0.1-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO] 
[INFO] >>> tomcat7-maven-plugin:2.2:run (default-cli) > process-classes @ TestSSM1 >>>
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ TestSSM1 ---
[INFO] Using 'utf-8' encoding to copy filtered resources.
[INFO] Copying 18 resources
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ TestSSM1 ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] <<< tomcat7-maven-plugin:2.2:run (default-cli) < process-classes @ TestSSM1 <<<
[INFO] 
[INFO] 
[INFO] --- tomcat7-maven-plugin:2.2:run (default-cli) @ TestSSM1 ---
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/junit/junit/4.10/junit-4.10.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.198 s
[INFO] Finished at: 2018-07-10T14:57:35+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run (default-cli) on project TestSSM1: 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🏺2.2 -> org.apache.tomcat.maven:common-tomcat-maven-plugin🏺2.2 -> org.apache.maven:maven-project🏺2.2.1 -> org.apache.maven:maven-settings🏺2.2.1 -> org.codehaus.plexus:plexus-container-default🏺1.0-alpha-9-stable-1 -> junit:junit🏺4.10: Failed to read artifact descriptor for junit:junit🏺4.10: Could not transfer artifact junit:junit:pom:4.10 from/to central (https://repo.maven.apache.org/maven2): 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

加载中
0
树人云飞
树人云飞

pom加

<pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.tomcat.maven</groupId>
                    <artifactId>tomcat7-maven-plugin</artifactId>
                    <version>2.1</version>
                    <configuration>
                        <uriEncoding>UTF-8</uriEncoding>
                        <server>tomcat7</server>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

自欺欺你
项目已经有了这个了 <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <conf
0
树人云飞
树人云飞

缺少依赖.缺什么填什么

自欺欺你
已经存在依赖了 <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <config
0
介个银好帅
介个银好帅

Could not transfer artifact junit:junit:pom:4.10 from/to central (https://repo.maven.apache.org/maven2): Received fatal alert: protocol_version -> [Help 1]

0
yongk
yongk

把本地仓库的junit4.10删掉,然后mvn clean install一下。

0
自欺欺你

我删除了仓库中的内容,然后把setting.xml中配置换成阿里的nexus,再更新update settings,然后在update project就可以了。

0
自欺欺你

估计是现连接的maven服务器有问题,jar总是自动下载不了,要一个个手动下载。

0
n
nianzhilian

我也同样出现这个问题   楼主解决了吗

0
n
nianzhilian

我已经改成了 阿里的nexus  还是报这个错误 ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:redeploy (default-cli) on project testmaven: Cannot invoke Tomcat manager: Connection refused: connect -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:redeploy (default-cli) on project testmaven: Cannot invoke Tomcat manager

0
n
nianzhilian

<plugin>
          <groupId>org.apache.tomcat.maven</groupId>
          <artifactId>tomcat7-maven-plugin</artifactId>
          <version>2.2</version>
          <configuration>
                    <url>http://localhost:8080/manager/html</url>
                    <username>tomcat</username>
                    <password>tomcat</password>
                    <update>true</update>
                    <path>/webapp</path>
                </configuration>
      </plugin>

这是我的配置

返回顶部
顶部