Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/hibernate/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 从hibernate映射文件生成DDL语句_Java_Hibernate_Maven 3 - Fatal编程技术网

Java 从hibernate映射文件生成DDL语句

Java 从hibernate映射文件生成DDL语句,java,hibernate,maven-3,Java,Hibernate,Maven 3,我们使用hibernate3maven插件plugin从hibernate映射文件生成DDL文件。由于hibernate 5不支持此插件,我正在寻找替代方案。有几个教程介绍了如何使用hibernate tools ant任务生成DDL,以及如何使用第三方hibernate tools maven插件生成DDL,该插件已合并到hibernate tools 6.0中。所有这些教程的一个问题是,它们使用反向工程从已经存在的数据库生成DDL语句和hbm文件,而不是相反。使用hibernate 5从hb

我们使用
hibernate3maven插件
plugin从hibernate映射文件生成DDL文件。由于hibernate 5不支持此插件,我正在寻找替代方案。有几个教程介绍了如何使用hibernate tools ant任务生成DDL,以及如何使用第三方hibernate tools maven插件生成DDL,该插件已合并到hibernate tools 6.0中。所有这些教程的一个问题是,它们使用反向工程从已经存在的数据库生成DDL语句和hbm文件,而不是相反。使用hibernate 5从hbm文件生成DDL语句是否有任何选项

下面是我们在hibernate3 maven插件中使用的配置

<plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>hibernate3-maven-plugin</artifactId>
        <configuration>
          <components>
            <component>
              <name>hbm2ddl</name>
              <outputDirectory>src/main/config/sql</outputDirectory>
            </component>
          </components>
          <componentProperties>
            <implementation>springconfiguration</implementation>
            <drop>false</drop>
            <create>true</create>
            <format>false</format>
            <export>false</export>
            <console>false</console>
            <outputfilename>01_init_schema.sql</outputfilename>
            <appcontextlocation>classpath:uiem_persistence_core_without_tracelog_applicationCtx.xml</appcontextlocation>
            <sessionfactorybean>coreSessionFactory</sessionfactorybean>
            <datasourcebean>coreDataSource</datasourcebean>
          </componentProperties>
        </configuration>
      </plugin>

org.codehaus.mojo
hibernate3 maven插件
hbm2ddl
src/main/config/sql
弹簧配置
假的
真的
假的
假的
假的
01_init_schema.sql
类路径:uiem\u persistence\u core\u不带tracelog\u applicationCtx.xml
coreSessionFactory
核心数据源