Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 777427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T19:36:16+00:00 2026-05-14T19:36:16+00:00

My (simple) war project builds fine using mvn:package at the command line, but fails

  • 0

My (simple) war project builds fine using mvn:package at the command line, but fails to build in eclipse using maven via the sonatype plugin.
The error I’m getting is:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1-alpha-1:war (default-war) on project shoploops_webapp: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.1-alpha-1:war failed: dependenciesInfo : dependenciesInfo
---- Debugging information ----
message             : dependenciesInfo : dependenciesInfo
cause-exception     : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message       : dependenciesInfo : dependenciesInfo
class               : org.apache.maven.plugin.war.util.WebappStructure
required-type       : org.apache.maven.plugin.war.util.WebappStructure
path                : /webapp-structure/dependenciesInfo
line number         : 14

I really have two questions
1) How can I fix this error?
2) Why does mvn:package work fine at the command line, but not through the plugin? What is the difference between them in how they work, such that errors like this can occur?

Many thanks!

Edit: the stack trace from running it in debug mode:

Caused by: com.thoughtworks.xstream.converters.ConversionException: dependenciesInfo : dependenciesInfo
---- Debugging information ----
message             : dependenciesInfo : dependenciesInfo
cause-exception     : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message       : dependenciesInfo : dependenciesInfo
class               : org.apache.maven.plugin.war.util.WebappStructure
required-type       : org.apache.maven.plugin.war.util.WebappStructure
path                : /webapp-structure/dependenciesInfo
line number         : 14
-------------------------------
    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:48)
    at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:346)
    at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:317)
    at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:166)
    at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:130)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:105)
    ... 15 more
Caused by: com.thoughtworks.xstream.mapper.CannotResolveClassException: dependenciesInfo : dependenciesInfo
    at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:49)
    at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
    at com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass(ClassAliasingMapper.java:76)
    at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
    at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
    at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
    at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
    at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
    at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:60)
    at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
    at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
    at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
    at com.thoughtworks.xstream.mapper.ArrayMapper.realClass(ArrayMapper.java:76)
    at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
    at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
    at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
    at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:34)
    at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.determineType(AbstractReflectionConverter.java:296)
    at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:178)
    at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:125)
    at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:56)
    ... 28 more
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T19:36:17+00:00Added an answer on May 14, 2026 at 7:36 pm

    Why does mvn:package work fine at the command line, but not through the plugin? What is the difference between them in how they work, such that errors like this can occur?

    The short version is that m2eclipse does not use the same version that you use on the command line unless you told him to do so (and that would be my recommendation). If you wonder, m2eclipse uses embedded Maven 3 (Maven Embedder 3.0.0.200912160759).

    How can I fix this error?

    Actually, the problem is logged in http://jira.codehaus.org/browse/MWAR-187 which provides several workarounds.

    • downgrade the maven-war-plugin to 2.1-alpha-1
    • deactivate the cache by modifying the maven-war-plugin configuration

      <configuration>
        <useCache>false</useCache>
      </configuration>
      

    And I think that configuring M2Eclipse to not use Maven Embedder (but the version you use on the CLI) would also solve the problem and this is my suggestion. You’ll find this setting in Window > Preferences > Maven.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use Maven to package as war a Java EE project. I use tomcat-maven-plugin,
I have a simple WAR project managed by Maven. I have the servlet code
I'm using netbeans 6.7.1 and I have a maven web project (war file). I'd
Using maven 3.0.4 I have a multi-module maven project, with some modules producing war
Scenario: 1) create maven ear project, create war project inside 2) add beans.xml to
I'm developing a simple, training application with Spring MVC and Hibernate. I'm using Maven
I'm trying to get a simple RestEasy project to work in Eclipse (with Jboss
I have a problem with my school project. Im using hibernate,jsp and maven for
Summary: Running mvn war:war fails with errors including: The following artifacts could not be
I use Maven and the maven-war-plugin to to build my WAR. All JSPs are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.