关于Cannot construct org.apache.maven.plugin.war.util.WebappStructure maven打包问题解决

来源:互联网 发布:java异步调用方法 编辑:程序博客网 时间:2024/06/06 09:47

     今天本来打算学习下cxf,用maven创建工程打包报错



[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 constructorcause-exception     : com.thoughtworks.xstream.converters.reflection.ObjectAccessExceptioncause-message       : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructorclass               : org.apache.maven.plugin.war.util.WebappStructurerequired-type       : org.apache.maven.plugin.war.util.WebappStructurepath                : /webapp-structureline number         : 1-------------------------------[INFO] ------------------------------------------------------------------------[INFO] Tracecom.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 constructorcause-exception     : com.thoughtworks.xstream.converters.reflection.ObjectAccessExceptioncause-message       : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructorclass               : org.apache.maven.plugin.war.util.WebappStructurerequired-type       : org.apache.maven.plugin.war.util.WebappStructurepath                : /webapp-structureline number         : 1 
结果在stackoverflow 上提供了一个解决方案结果真见效,主要是我的插件
    <plugin><artifactId>maven-war-plugin</artifactId>    </plugin>
没有配版本了,结果加上
<version>2.1.1</version>
一下子就搞定了。我想这应该是插件版本太低了,打成war包就出了问题。原文参见
http://stackoverflow.com/questions/7539970/cannot-construct-org-apache-maven-plugin-war-util-webappstructure-as-it-does-not

0 0
原创粉丝点击