[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>
相关推荐
Java中的`ClassNotFoundException`异常通常表示在尝试加载特定类时,JVM无法找到对应的字节码文件。这个异常可能由多种原因引起,但在本场景中,它与Java 9引入的模块系统及其对Java EE API的影响密切相关。 在Java...
3. **Maven构建提示`Could not initialize class org.apache.maven.plugin.war.util.WebappStructureSerializer`**:这个问题通常意味着`maven-war-plugin`插件的版本太低,无法与当前Maven环境兼容。解决方法是在`...
Pom:文件夹,jar和war文件,mavenProject:一个项目,可以放jar和war包,通过pom,一般新创建的maven Project是POM 3.4.创建一个Maven Model 最外面的项目是MavenProject,其它的全部是Maven Model 3.4.1.创建JAR 目录...
│ │ │ frame-sourcefiles-org.apache.ibatis.plugin.html │ │ │ frame-sourcefiles-org.apache.ibatis.reflection.factory.html │ │ │ frame-sourcefiles-org.apache.ibatis.reflection.html │ │ │ ...
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0 <groupId>org....
如果要执行项目编译,那么直接输入:mvn compile即可,对于其他的阶段可以类推。阶段之间是存在依赖关系(dependency)的,如test依赖test-compile。在执行mvn test时,会先运行mvn test-compile,然后才是mvn test...
在插件方面,Maven拥有丰富的生态,如maven-compiler-plugin用于编译源代码,maven-surefire-plugin负责单元测试,maven-javadoc-plugin生成API文档,maven-source-plugin打包源码等。这些插件极大地扩展了Maven的...
在Maven的Mojo中实现reduce操作,开发者需要编写一个Mojo类,该类需要继承`org.apache.maven.plugin.Mojo`抽象类,并提供必要的注解来定义Mojo的行为。关键在于定义执行方法(execute),在这个方法中实现reduce逻辑...
《开源项目:lenskit-eval-maven-plugin-2.0.3.1与composite-logging-api的深度解析》 在IT行业中,开源项目扮演着至关重要的角色,它们提供了丰富的功能,同时也为开发者们提供了学习和贡献的平台。本文将深入探讨...
'${plugin.artifacts}' 类型为 'java.util.List' 分配给它。这通常意味着在构建过程中的某个阶段,Maven 遇到了变量解析或插件配置的错误。 Maven 是一个广泛使用的Java项目管理工具,它负责构建、依赖管理和项目...
<groupId>org.apache.maven.plugins <artifactId>maven-compiler-plugin <version>3.8.1 <source>1.6 <target>1.6 </plugin> ``` 以上步骤详细介绍了Maven的安装、配置以及如何与Eclipse集成的过程,...
以上就是关于"source-overlay-maven-plugin-1.10.4.zip"和"BlueSoft-Util.zip"的相关知识点,它们涵盖了项目构建、工具库设计以及开源社区的实践。理解这些概念对于Java开发人员来说是非常有价值的,可以帮助他们更...
Maven多模块项目配置详解 在本节中,我们将详细讨论Maven多模块项目配置的实现方法。Maven多模块项目是指一个父模块包含多个子模块,每个子模块都是一个独立的Maven项目。这种结构可以使得项目的管理和维护变得更加...
5. **测试插件**:使用Maven的`mvn install`命令将插件安装到本地仓库,然后在项目中引用它,通过`mvn <goal>`来执行自定义的打包任务。 通过这种方式,你可以根据项目需求自定义打包过程,例如,只包含特定版本的...
这个项目是关于如何将一个基于Solon的Web应用程序打包成原生(native)可执行程序的实例,目的是为了提高应用的启动速度和运行效率。原生可执行程序可以直接在操作系统上运行,无需JVM,这极大地优化了部署流程,...
Maven插件是Maven生态系统的一部分,用于扩展Maven的功能,帮助执行特定的任务,比如编译、测试、打包和部署项目。 "jabsaw-maven-plugin"很可能是一个针对特定需求定制的Maven插件,比如代码分析、重构或者构建...
8. **Maven集成**:如果你的项目使用Maven构建,可以配置Jetty Maven Plugin,通过执行`mvn jetty:run`命令,直接在命令行中启动和测试应用,这样也可以与Eclipse集成,实现开发流程的一致性。 9. **日志和错误处理...