eclipse中创建Maven项目时
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>
如果还不行就是本地仓库下载的JAR包错误,删除本地仓库中的JAR包,重新下载