Maven常见异常及解决方法
异常1:
[ERROR] Failed to execute goal on project biz_zhuhai: Could not resolve dependencies for project biz_zhuhai:biz_zhuhai:jar:0.0.1-SNAPSHOT: Failed to collect dependencies for [com.maywide.ibh:lib345:pom:1.0 (compile)]: Failed to read artifact descriptor for com.maywide.ibh:lib345:pom:1.0: Could not transfer artifact com.maywide.ibh:lib345:pom:1.0 from/to releases (http://localhost:9888/nexus-2.0.3/content/repositories/releases): Connection to http://localhost:9888 refused: Connection refused: connect -> [Help 1]
解决方法:
这是配置的url有错误或者是私服没有配好,导致构件下载时出错。如果没有jar包需要在私服里下载,可以不配置私服的,也就是可以把setting.xml的profiles里的东西全部删除的。
异常2:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project web_nanchang: There are test failures.
[ERROR]
[ERROR] Please refer to E:\maven\web_nanchang\target\surefire-reports for the individual test results.
解决方法:
这是因为测试代码时遇到错误,它会停止编译。只需要在pom.xml的<project>里添加以下配置,使得测试出错不影响项目的编译。
<build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><configuration><testFailureIgnore>true</testFailureIgnore></configuration></plugin></plugins> </build>
异常3:
[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.0.6:start (start-container) on project myproject: Execution start-container of goal org.codehaus.cargo:cargo-maven2-plugin:1.0.6:start failed: Error while expanding C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\cargo\installs\apache-tomcat-6.0.29.zip
[ERROR] java.io.IOException: Negative seek offset
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutio
nException
解决方法:
自己下载“apache-tomcat-6.0.29.zip”,将下载好的文件拷贝到指定文件夹“C:\Documents and Settings\Administrator\Local Settings\Temp\cargo\installs”下。
异常4:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-war) on project web_nanchang: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [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:
解决方法:
maven的web项目默认的webroot是在src\main\webapp。如果在此目录下找不到web.xml就抛出以上的异常。解决方法在pom.xml加入以下的配置。红色字体改成你网站的根目录。
<build><finalName>simple-webapp</finalName><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-war-plugin</artifactId><version>2.1.1</version><configuration><webResources><resource><!-- this is relative to the pom.xml directory --><directory>WebContent</directory></resource></webResources></configuration></plugin></plugins> </build>
转载于:https://www.cnblogs.com/telwanggs/p/7064509.html
Maven常见异常及解决方法相关推荐
- Android ExceptionThrowable 常见异常和解决方法 奔溃日志上报 monkey异常修改
java将所有的错误封装为一个对象,其根本父类为Throwable, Throwable有两个子类:Error和Exception. 注意:异常和错误的区别:异常能被程序本身可以处理,错误是无法处理. ...
- python常见异常及解决方法
异常1: ValueError: unsupported hash type sha224 ERROR:root:code for hash sha256 was not found. Traceba ...
- 康佳电视显示服务器连接异常,康佳电视五大常见故障及解决方法
首页文章列表系统知识正文 康佳电视常见故障--五大常见故障以及解决方法介绍 2016-10-30 22:13:53 16546 电视在使用过程中,也是会经常出现这样那样的问题.康佳电视也不会例外.很 ...
- 稳定性专题 | Spring Boot 常见错误及解决方法
导读 『StabilityGuide』是阿里多位阿里技术工程师共同发起的稳定性领域的知识库开源项目,涵盖性能压测.故障演练.JVM.应用容器.服务框架.流量调度.监控.诊断等多个技术领域,以更结构化的 ...
- springboot jar中没有主清单属性_Spring Boot 常见错误及解决方法
导读 Spring Boot 作为 Java 生态中最流行的开发框架,意味着被数以万计的开发者所使用.下面根据我们自身遇到的问题,加上用户提供的一些反馈,来大致梳理下 Spring Boot 的常见错 ...
- NoSuchMethodError 常见原因及解决方法
当应用程序试图调用类(静态或实例)的指定方法,而该类已不再具有该方法的定义时,就会抛出 java.lang.NoSuchMethodError 错误.简单地说,就是同一个 Class 有多个版本的实现 ...
- selenium 学习、工作 记录,附常见异常和工具方法
selenium 学习.工作 记录,附常见异常和工具方法 基础配置 2020.03.31 开发者模式 设置有认证的http代理 让selenium接管人为打开的chrome 2020.07.23(79 ...
- Android 常见异常及解决办法
Ø 前言 本文主要记录 Android 的常见异常及解决办法,以备以后遇到相同问题时可以快速解决. 1. java.lang.NullPointerException: Attempt to i ...
- 机器学习的5个常见痛点及解决方法
人们可能听说过很多机器学习的用例.例如参加会议.分享人工智能技术的LinkedIn帖子.以及博客文章都有所提及.虽然人们都知道机器学习这个术语,但在多大程度上理解了机器学习的含义? 对于IT或数据科学 ...
最新文章
- 【深度学习理论】(3) 激活函数
- Real World Kanban作者访谈
- Leaflet中使用NavBar插件实现导航(前进后退)效果
- s3c2440的内存管理机制
- 语音信号处理基础(八)——同态处理、倒谱、复倒谱
- JavaScript 数据类型梳理
- HDU4635 Strongly connected
- STM32程序下载电路分析
- phpnow开启mysqli扩展
- 如何使用QT实现左右滑动的按钮
- matlab clc,close,close all,clear,clear all,clf 作用区别
- 三菱触摸屏怎么改时间_三菱触摸屏时钟设置步骤
- futuretask java 并发请求_【Java并发】Runnable、Callable、Future、FutureTask
- 微信公众号发送客服消息(文本、图文)和模板消息
- git remote prune
- 8.10 12.1-12.5
- Eth 02 - MII接口概述及代码解析
- 在 dart fluter 中使用 typedef
- 天谕搬砖哪个服务器稳定,天谕手游搬砖玩什么职业好 搬砖强势职业推荐
- #18 可视化基础4-簇形柱状图、百分比堆积柱状图、并列子图
热门文章
- 基于DPDK+VPP实现高性能防火墙
- LogSegment分析
- (107)FPGA面试题-Verilog编写200ns异步/同步低有效复位激励
- (62)SPI外设驱动协议(一)(第13天)
- ssd1306 OLED 初始化流程
- php判断值是否为空然后定义,判断php变量是不是定义,是否为空
- PPP协议体系的实现
- 【JAVA】接口中的default和static方法
- 关于Python ord()和chr()返回ASCII码和Unicode码的看法
- lisp 提取字符串中的數字_Redis 数据结构之字符串的那些骚操作