我正在使用war覆盖来构建自定义网站。问题是原始战争有一个旧的依赖,我想在建立战争时取代它。我排除了旧罐子并包括新罐子,但是当我打包它时,旧罐子仍然在那里。这是我的pom:
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.foo</groupId>
<artifactId>test</artifactId>
<version>1</version>
<packaging>war</packaging>
<properties>
<cas.version>3.4.5</cas.version>
</properties>
<dependencies>
<dependency>
<groupId>org.jasig.cas</groupId>
<artifactId>cas-server-webapp</artifactId>
<version>${cas.version}</version>
<type>war</type>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api </artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api </artifactId>
<version>1.0.0.Final</version>
</dependency>
</dependencies>
<build>
<finalName>xp.test</finalName>
</build>
</project>
谢谢。