maven+hibernate3构建项目的pom.xml

maven+hibernate3构建项目的pom.xml

<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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
<!--项目基本信息-->

  <groupId>com.loubing.test</groupId>
  <artifactId>myhibernate</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>myhibernate</name>
<!--依赖包来源,这里是我自己建立的一个私服。也可以用https://repo1.maven.org/maven2/  -->
  <url>http://localhost:10000/nexus/content/groups/public</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
    <!-- hibernate -->
    <dependency>
 <groupId>c3p0</groupId>
 <artifactId>c3p0</artifactId>
 <version>0.9.1.2</version>
  </dependency>
            
   <!-- 添加Hibernate依赖 -->   
    <dependency> 
      <groupId>org.hibernate</groupId> 
      <artifactId>hibernate3</artifactId> 
      <version>3.0.2</version> 
    </dependency> 
    <!--以下的包其实可以用hibernate-core,但是我觉得太多了,根据需要,就把几个重要的单独添加进来-->
    <dependency>
        <groupId>org.hibernate.javax.persistence</groupId>
        <artifactId>hibernate-jpa-2.0-api</artifactId>
        <version>1.0.1.Final</version>
    </dependency>
    <dependency>
     <groupId>commons-collections</groupId>
     <artifactId>commons-collections</artifactId>
     <version>3.1</version>
 </dependency>
 <dependency>
     <groupId>javax.transaction</groupId>
     <artifactId>jta</artifactId>
     <version>1.1</version>
 </dependency>
    <dependency>   
        <groupId>dom4j</groupId>   
        <artifactId>dom4j</artifactId>   
        <version>1.1</version>
    </dependency>
    <dependency>   
        <groupId>org.slf4j</groupId>   
        <artifactId>slf4j-api</artifactId>   
        <version>1.4.2</version>
    </dependency>
    <dependency>   
        <groupId>org.slf4j</groupId>   
        <artifactId>slf4j-log4j12</artifactId>   
        <version>1.4.2</version>
    </dependency>
    <dependency>   
        <groupId>javassist</groupId>   
        <artifactId>javassist</artifactId>   
        <version>3.11.0.GA</version>
    </dependency>
    <!-- 添加oracle10g jdbc driver --> 
    <dependency>   
        <groupId>com.oracle</groupId>   
        <artifactId>ojdbc14</artifactId>   
        <version>10.2.0.1.0</version>
    </dependency>
  </dependencies>
</project>

你可能感兴趣的:(maven+hibernate3构建项目的pom.xml)