`

hibernate-tools maven插件

    博客分类:
  • JEE
阅读更多

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>3.1-SNAPSHOT</version>
<!-- <version>3.0</version> -->

<executions>
    <execution>
        <id>Generate hbm.xml mappings</id>
        <phase>generate-sources</phase>
        <configuration>
            <hibernatetool destdir="src/main/java"> 
                 <jdbcconfiguration propertyfile="hibernate.properties" packagename="entity" /> 
                 <!-- <hbm2hbmxml/> <hbm2cfgxml/>

                <classpath>

                    <path location="target/classes"/> 
                 </classpath> -->
                 <!--基于注解-->
                 <hbm2java ejb3="true"> 
                      <!-- <configuration configurationfile="target/classes/hibernate.cfg.xml"/> -->
                 </hbm2java> 
             </hibernatetool> 
        </configuration>
        <goals>
            <goal>run</goal>
        </goals>
      </execution>
    </executions>
</plugin>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.4.0.GA </version>
</dependency>

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics