ITeye博客

use hibernate3-maven to export sql based on entity

IvanLi · 2011-08-07 18:19 · 技术天地 · 数据库 · Markdown


<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>hibernate3-maven-plugin</artifactId>
				<configuration>
					<components>
						<component>
							<name>hbm2ddl</name>
						</component>
					</components>
					<componentProperties>
						<drop>true</drop>
						<create>true</create>
						<ejb3>true</ejb3>
						<java5>true</java5>
						<export>true</export>
						<scan-classes>true</scan-classes>
						<outputfilename>schema.sql</outputfilename>
						<configurationfile>src/main/resources/local/hibernate.cfg.xml</configurationfile>
					</componentProperties>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>mysql</groupId>
						<artifactId>mysql-connector-java</artifactId>
						<version>5.1.13</version>
					</dependency>
				</dependencies>
			</plugin>

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。