maven+hibernate3构建项目的pom.xml

2016/03/09 10:16
阅读数 26

<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.eric.test</groupId>
  <artifactId>myhibernate</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>myhibernate</name>


<!--依赖包来源 -->
  <url>https://repo1.maven.org/maven2/</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>

展开阅读全文
打赏
1
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
1
分享
在线直播报名
返回顶部
顶部