maven web项目执行install异常:org.apache.maven.plugin.war.util.WebappStructure

2023-05-16

[INFO] Packaging webapp

[INFO] ------------------------------------------------------------------------

[ERROR] FATAL ERROR

[INFO] ------------------------------------------------------------------------

[INFO] Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor

---- Debugging information ----

message             : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor

cause-exception     : com.thoughtworks.xstream.converters.reflection.ObjectAccessException

cause-message       : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor

class               : org.apache.maven.plugin.war.util.WebappStructure

required-type       : org.apache.maven.plugin.war.util.WebappStructure

path                : /webapp-structure

line number         : 1

-------------------------------

[INFO] ------------------------------------------------------------------------

[INFO] Trace

com.thoughtworks.xstream.converters.ConversionException: Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor

---- Debugging information ----

message             : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor

cause-exception     : com.thoughtworks.xstream.converters.reflection.ObjectAccessException

cause-message       : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor

class               : org.apache.maven.plugin.war.util.WebappStructure

required-type       : org.apache.maven.plugin.war.util.WebappStructure

path                : /webapp-structure

line number         : 1

-------------------------------

at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:63)

at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:45)

at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:46)

at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:117)

at com.thoughtworks.xstream.core.ReferenceByXPathMarshallingStrategy.unmarshal(ReferenceByXPathMarshallingStrategy.java:29)

at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:846)

at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:833)

at com.thoughtworks.xstream.XStream.fromXML(XStream.java:781)

at org.apache.maven.plugin.war.util.WebappStructureSerializer.fromXml(WebappStructureSerializer.java:73)

at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:404)

at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:375)

at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:181)

at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:143)

at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)

at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)

at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)

at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)

at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)

at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)

at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

Caused by: com.thoughtworks.xstream.converters.reflection.ObjectAccessException: Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor

at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.newInstance(PureJavaReflectionProvider.java:59)

at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.instantiateNewInstance(AbstractReflectionConverter.java:257)

at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:124)

at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:56)

... 36 more

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 3 seconds

[INFO] Finished at: Wed Aug 06 11:41:01 CST 2014

[INFO] Final Memory: 29M/70M

[INFO] ------------------------------------------------------------------------

 

 

 

在执行一个web项目的install命令时遇到了上面的错误,用的是2.2.1版本的maven,jdk1.7.65。

可能的原因是 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId>

这个插件的默认的版本在jdk1.7下有问题,指定2.1.1版本后就没有问题了,修改为下面


<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.1.1</version>
            </plugin>  

 

 

参考:http://stackoverflow.com/questions/7539970/cannot-construct-org-apache-maven-plugin-war-util-webappstructure-as-it-does-not

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

maven web项目执行install异常:org.apache.maven.plugin.war.util.WebappStructure 的相关文章

  • vncserver too many security failures

    在服务器上开了几个虚拟机 xff0c 装了VNC之后 xff0c 经常遇到报错too many security failures 查了下相关资料 xff0c 原来是有人在暴力破解 xff0c 触发了VNC的黑名单机制 重置黑名单 xff0
  • Centos7 官方安装方法(略有修改),nextcloud-20.0.1版本亲测

    Centos7 官方安装方法 略有修改 nextcloud 20 0 1版本亲测 执行第一个脚本文件 文件内容如下 bin bash systemctl stop firewalld systemctl disable firewalld
  • SecureCRT_Python笔记

    文章目录 说明常用语法python脚本开头格式Sleep睡眠发送命令或文本弹出消息框 常用对象操作Application 应用程序对象属性ActivePrinter 活动打印机ScriptFullName 脚本名称Version 版本 方法
  • 常用Docker项目合集

    文章目录 使用说明docker官方一键安装脚本使普通用户可以使用Docker使用国内加速器Portainer 容器管理Portainer 官方 常用服务器备份同步使用docker部署backuppc文件备份adferrand backupp
  • Python习题(第2课)

    一 天天向上的力量 C 一年365天 xff0c 以第1天的能力值为基数 xff0c 记为1 0 当好好学习时 xff0c 能力值相比前一天提高N xff1b 当没有学习时 xff0c 由于遗忘等原因能力值相比前一天下降N 每天努力或放任
  • Openpyxl笔记

    文章目录 介绍工作薄操作创建工作薄对象打开工作薄工作薄属性工作薄方法遍历工作薄中的工作表 工作表操作创建工作表指定工作表删除工作表复制工作表获取工作表的总行数和总列数工作表的Table创建Table删除Table 工作表属性工作表方法获取工
  • xlwings笔记

    文章目录 介绍xlwings 常用实例读取 写入单元格将列表写入某个范围 xlwings 安装顶级函数顶级函数xlwings load顶级函数xlwings view appsapps 介绍apps属性查看Apps包含的所有App返回App
  • NextCloud 最新官方源代码安装包及客户端下载

    官方搬运 服务端 源代码安装包 大版本小版本V13V13 0 5下载V14V14 0 1下载V15V15 0 4下载V15V15 0 5下载V15V15 0 7下载V16V16 0 0下载V16V16 0 1下载V16V16 0 2下载V1
  • 河北保定电信家庭宽带获取原生IPv6地址,中兴F650光猫加MikroTik路由器

    先用电脑接光猫输入192 168 1 1 用户名 xff1a telecomadmin 密码 xff1a nE7jA 5mROS路由器设置
  • [翻译]Learning Deep Features for Discriminative Localization

    英文原文请点这里 摘要 在这项工作中 xff0c 我们重新审视了 Network in network 中提出的全局平均 池化层 xff08 global average pooling xff09 xff0c 并阐明了它是如何通过图片标签
  • 2. 嵌入式OpenWRT入门基础篇-----OpenWRT固件烧录

    OpenWRT固件烧录方式有很多种 xff0c 会逐渐更新烧录方法 一 此方法适用于OpenWRT 系统可以正常启动的情况 xff0c 用于OpenWRT 固件的升级 1 xff09 开发板上电 xff0c 至启动完成 2 xff09 登录
  • OpenCV源码中Haar训练及提取特征的代码

    我想计算Haar特征 xff0c 自己手动计算感觉挺麻烦 xff08 主要在取各个不同位置 不同scale的特征 xff09 xff0c 而且可能速度不够 OpenCV 的这个把所有东西都封装起来了 xff0c 由于我的online boo
  • 梯度向量、Jacobian矩阵、Hessian矩阵

    这里 xff0c 讨论三个概念 xff1a 梯度向量 Jacobian矩阵 Hessian矩阵 xff1b 由自变量x 61 x1 x2 xn T 因变量 xff1a 为一维f x 时 xff0c 此时其一阶导数构成的向量为梯度向量g x
  • linux查看当前加载的所有动态库

    在我们做Linux开发的时候 xff0c 往往会出现 某些库 can not found 的情况 xff0c 在我们添加了这些库之后 xff0c 如何查看这些库的路径是否被识别了呢 xff1f 下面介绍一个命令 xff1a ldconfig
  • 《软件工程》实训报告

    摘要 软件工程是一门研究用工程化方法构建和维护有效的 实用的和高质量的软件的学科 它涉及程序设计语言 数据库 软件开发工具 系统平台 标准 设计模式等方面 该论文主要回顾了本人在迪丽瑟斯网站开发中的实践经历和项目经验 xff0c 以及得出的
  • ERROR 1129 (00000): #HY000Host ‘*.*.*.*’ is blocked because of many connection errors;

    今天使用工具nvicat连接mysql的时候报错误 xff1a ERROR 1129 00000 HY000Host is blocked because of many connection errors unblock with mys
  • Win7使用附件中的远程桌面连接Ubuntu 15.04图形界面(xrdp方法)

    Ubuntu15 04下 以下命令行皆是在终端中运行 xff1a 安装xrdp span class hljs built in sudo span apt get install xrdp 安装vnc4server span class
  • Qt设置常见窗口背景色几种方式

    常见窗口背景色 总结qt 常见设置QWidget 类型窗口背景色几种方式 setStyleSheet ui span class token punctuation span widget span class token operator
  • 操作手册(GB8567——88)

    操作手册 xff08 GB8567 88 xff09 1 引言 1 1 编写目的 说明编写这份操作手册的目的 xff0c 指出预期的读者 1 2 前景 说明 xff1a a xff0e 这份操作手册所描述的软件系统的名称 xff1b b x
  • SONIC架构简要分析(一)-数据库

    随着SONIC的日趋成熟 xff0c 在互联网行业应用会越来越多 xff0c SONIC 43 白盒交换机的方式或许会成为将来数据中心的主流接入交换机 为此 xff0c 对SONIC的架构进行简要分析 xff0c 看看与传统的网络操作系统的

随机推荐