为什么 Hibernate3 被导入到我的项目中?我正在尝试使用 Hibernate4,但 Maven 也正在导入 Hibernate3?
这是我的 POM.XML
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.uftwf.schoolvisit</groupId>
<artifactId>SchoolVisit</artifactId>
<name>School Visit</name>
<packaging>war</packaging>
<version>1.0.0-BUILD-SNAPSHOT</version>
<properties>
<java-version>1.5</java-version>
<springframework-version>3.1.1.RELEASE</springframework-version>
<springwebflow-version>2.3.1.BUILD-SNAPSHOT</springwebflow-version>
<springsecurity-version>3.1.1.RELEASE</springsecurity-version>
<org.slf4j-version>1.5.10</org.slf4j-version>
<hibernate.version>4.1.1.Final</hibernate.version>
</properties>
<dependencies>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${springframework-version}</version>
<!-- will come with all needed Spring dependencies such as spring-core
and spring-beans -->
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>${springframework-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${springframework-version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.webflow</groupId>
<artifactId>spring-faces</artifactId>
<version>${springwebflow-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>${springsecurity-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${springsecurity-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${springsecurity-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-ldap</artifactId>
<version>${springsecurity-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-cas</artifactId>
<version>${springsecurity-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-cas-client</artifactId>
<version>3.0.7.RELEASE</version>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.5</version>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.21</version>
</dependency>
<dependency>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.2.1</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.2.1</version>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-ext</artifactId>
<version>${org.slf4j-version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${org.slf4j-version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${org.slf4j-version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${org.slf4j-version}</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
<!-- JSF-303 Dependency Injection -->
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<!-- Servlet -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- Sun Mojarra JSF 2 runtime -->
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.1.7</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1.7</version>
</dependency>
<!-- JSR 303 validation -->
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
<!-- **********************************************************************
** HIBERNATE DEPENDENCIES ** ********************************************************************** -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.0.2.GA</version>
</dependency>
<!-- Test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<!-- For testing against latest Spring snapshots -->
<repository>
<id>org.springframework.maven.snapshot</id>
<name>Spring Maven Snapshot Repository</name>
<url>http://maven.springframework.org/snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<!-- For developing against latest Spring milestones -->
<repository>
<id>org.springframework.maven.milestone</id>
<name>Spring Maven Milestone Repository</name>
<url>http://maven.springframework.org/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<!-- For Hibernate Validator -->
<repository>
<id>org.jboss.repository.releases</id>
<name>JBoss Maven Release Repository</name>
<url>https://repository.jboss.org/nexus/content/repositories/releases</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<!-- For Sun Mojarra JSF 2 implementation -->
<repository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<!-- For PrimeFaces JSF component library -->
</repositories>
<build>
<finalName>SchoolVisit</finalName>
</build>
</project>
这是 maven 添加到我的项目中的文件列表:
activation-1.1.jar
antlr-2.7.6.jar
antlr-2.7.7.jar
aopalliance-1.0.jar
asm-3.1.jar
asm-3.3.1.jar
asm-attrs-1.5.3.jar
aspectjrt-1.6.8.jar
aspectjtools-1.6.2.jar
aspectjweaver-1.6.8.jar
c3p0-0.9.1.2.jar
c3p0-0.9.2-pre4.jar
cal10n-api-0.7.2.jar
cas-client-core-3.1.10.jar
cas-client-core-3.1.12.jar
cas-client-core-3.2.1.jar
cglib-2.2.2.jar
cglib-2.2.jar
commons-beanutils-1.8.0.jar
commons-codec-1.4.jar
commons-codec-1.6.jar
commons-collections-3.1.jar
commons-dbcp.jar
commons-digester-1.8.1.jar
commons-email-1.0.jar
commons-fileupload-1.1.1.jar
commons-io-1.1.jar
commons-lang-2.5.jar
commons-logging-1.1.1.jar
commons-pool.jar
dom4j-1.6.1.jar
dumbster-1.6.jar
ehcache-1.2.3.jar
files.txt
hibernate-annotations-3.5.0-Final.jar
hibernate-commons-annotations-3.2.0.Final.jar
hibernate-commons-annotations-4.0.1.Final.jar
hibernate-core-3.5.0-Final.jar
hibernate-core-4.1.1.Final.jar
hibernate-entitymanager-3.5.0-Final.jar
hibernate-entitymanager-4.1.1.Final.jar
hibernate-jpa-2.0-api-1.0.0.Final.jar
hibernate-jpa-2.0-api-1.0.1.Final.jar
hibernate-search-3.0.0.GA.jar
hibernate-validator-4.0.2.GA.jar
hsqldb-1.8.0.10.jar
httpclient-4.1.2.jar
httpclient-4.2.1.jar
httpclient-cache-4.1.2.jar
httpcore-4.1.2.jar
httpcore-4.2.1.jar
httpmime-4.1.2.jar
icu4j-2.6.1.jar
jackson-core-asl-1.5.3.jar
jackson-mapper-asl-1.5.3.jar
javassist-3.15.0-GA.jar
javassist-3.9.0.GA.jar
javax.inject-1.jar
javax.servlet-jstl-1.2.jar
jaxb-api-2.1.jar
jaxb-impl-2.1.3.jar
jaxen-1.1.1.jar
jboss-logging-3.1.0.GA.jar
jboss-transaction-api_1.1_spec-1.0.0.Final.jar
jcl-over-slf4j-1.5.10.jar
jdom-1.0.jar
joda-time-1.6.jar
joda-time-jsptags-1.0.2.jar
jsf-api-2.1.7.jar
jsf-impl-2.1.7.jar
jstl-1.2.jar
jstl-jstl-1.2.jar
jta-1.1.jar
log4j-1.2.14.jar
log4j-1.2.15.jar
log4j-1.2.16.jar
lucene-core-2.3.2.jar
lucene-highlighter-2.0.0.jar
mail-1.4.5.jar
mail-1.4.jar
mailapi.jar
mail.jar
mchange-commons-java-0.2.2.jar
mysql-connector-java-5.0.5.jar
mysql-connector-java-5.1.21.jar
org.springframework.aop-3.1.1.RELEASE.jar
org.springframework.asm-3.1.1.RELEASE.jar
org.springframework.aspects-3.1.1.RELEASE.jar
org.springframework.beans-3.1.1.RELEASE.jar
org.springframework.binding-2.3.1.RELEASE.jar
org.springframework.context-3.1.1.RELEASE.jar
org.springframework.context.support-3.1.1.RELEASE.jar
org.springframework.core-3.1.1.RELEASE.jar
org.springframework.expression-3.1.1.RELEASE.jar
org.springframework.faces-2.3.1.RELEASE.jar
org.springframework.instrument-3.1.1.RELEASE.jar
org.springframework.instrument.tomcat-3.1.1.RELEASE.jar
org.springframework.jdbc-3.1.1.RELEASE.jar
org.springframework.jms-3.1.1.RELEASE.jar
org.springframework.js-2.3.1.RELEASE.jar
org.springframework.js.resources-2.3.1.RELEASE.jar
org.springframework.orm-3.1.1.RELEASE.jar
org.springframework.oxm-3.1.1.RELEASE.jar
org.springframework.test-3.1.1.RELEASE.jar
org.springframework.transaction-3.1.1.RELEASE.jar
org.springframework.web-3.1.1.RELEASE.jar
org.springframework.webflow-2.3.1.RELEASE.jar
org.springframework.web.portlet-3.1.1.RELEASE.jar
org.springframework.web.servlet-3.1.1.RELEASE.jar
org.springframework.web.struts-3.1.1.RELEASE.jar
persistence-api-1.0.jar
quartz-1.5.2.jar
slf4j-api-1.5.10.jar
slf4j-ext-1.5.10.jar
slf4j-log4j12-1.5.10.jar
smtp.jar
spring-aop-3.0.7.RELEASE.jar
spring-asm-3.1.1.RELEASE.jar
spring-aspects-3.1.1.RELEASE.jar
spring-beans-3.1.1.RELEASE.jar
spring-binding-2.3.1.BUILD-20120326.222602-13.jar
spring-context-3.1.1.RELEASE.jar
spring-context-support-3.1.1.RELEASE.jar
spring-core-3.1.1.RELEASE.jar
spring-expression-3.1.1.RELEASE.jar
spring-faces-2.3.1.BUILD-20120326.222626-13.jar
spring-jdbc-3.1.1.RELEASE.jar
spring-js-2.3.1.BUILD-20120326.222614-13.jar
spring-js-resources-2.3.1.BUILD-20120326.222607-13.jar
spring-ldap-1.3.1.RELEASE-all.jar
spring-ldap-core-1.3.1.RELEASE.jar
spring-orm-3.1.1.RELEASE.jar
spring-security-cas-3.1.0.RELEASE.jar
spring-security-cas-3.1.1.RELEASE.jar
spring-security-cas-client-3.0.7.RELEASE.jar
spring-security-config-3.1.0.RELEASE.jar
spring-security-config-3.1.1.RELEASE.jar
spring-security-core-3.1.0.RELEASE.jar
spring-security-core-3.1.1.RELEASE.jar
spring-security-crypto-3.1.0.RELEASE.jar
spring-security-ldap-3.1.0.RELEASE.jar
spring-security-ldap-3.1.1.RELEASE.jar
spring-security-openid-3.1.0.RELEASE.jar
spring-security-remoting-3.1.0.RELEASE.jar
spring-security-taglibs-3.1.0.RELEASE.jar
spring-security-web-3.1.0.RELEASE.jar
spring-security-web-3.1.1.RELEASE.jar
spring-tx-3.0.5.RELEASE.jar
spring-tx-3.1.1.RELEASE.jar
spring-web-3.1.1.RELEASE.jar
spring-webflow-2.3.1.BUILD-20120326.222621-13.jar
spring-webmvc-3.1.1.RELEASE.jar
stax-api-1.0-2.jar
tiles-api-2.1.3.jar
tiles-core-2.1.3.jar
tiles-jsp-2.1.3.jar
tiles-servlet-2.1.3.jar
urlrewritefilter-3.1.0.jar
validation-api-1.0.0.GA.jar
xalan-2.6.0.jar
xml-apis-1.0.b2.jar
xml-apis-1.3.02.jar
xmlParserAPIs-2.6.2.jar
xom-1.0.jar
你可以看到 maven 正在加载我需要的很多差异版本。有人可以帮我解决这个问题。