maven 刚创建就报错

来源:互联网 发布:知无涯者 台词 编辑:程序博客网 时间:2024/04/29 10:14

1、pom.xml报错:com.thoughtworks.xstream.io.HierarchicalStreamDriver

 

解决方案1、在pom文件中加入maven-war-plugin (我使用到的)

 

<plugins>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-war-plugin</artifactId>

<version>2.6</version>

<configuration>

<webResources>

<resource>

<directory>src/main/webapp/WEB-INF</directory>

<filtering>true</filtering>

<targetPath>WEB-INF</targetPath>

</resource>

</webResources>

</configuration>

</plugin>

</plugins>

 

 

解决方案2、在pom中配置依赖

 

<dependency>

<groupId>com.thoughtworks.xstream</groupId>

<artifactId>xstream</artifactId>

<version>1.4.9</version>

</dependency>