0

I'm upgrading to Hibernate 5 and found this plugin :-

              <plugin>
                    <groupId>de.jpdigital</groupId>
                    <artifactId>hibernate5-ddl-maven-plugin</artifactId>
                    <version>1.0.1-hibernate-5.1.2.Final</version>
                    <configuration>
                        <dialects>
                            <param>SQLSERVER2008</param>
                        </dialects>
                        <packages>
                            <param>com.mypackage</param>
                        </packages>
                        <outputDirectory>${project.build.directory}/hibernate-schema.sql</outputDirectory>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>gen-ddl</goal>
                            </goals>
                            <phase>package</phase>
                        </execution>
                    </executions>
                </plugin>

But when we run this, it does not create my file with name "hibernate-schema.sql", it creates it as directory and file name is as dialect name "sqlserver2008.sql".

Is there any way i can configure it to create my file as named "hibernate-schema.sql".

Abhishek-M
  • 410
  • 2
  • 14

1 Answers1

0

It doesn't look possible with that plugin.

The documentation for the gen-ddl goal shows only that the output directory is configurable.

Also, the source code for the mojo only has code to construct a file name based on the dialect and it does not read any options other than the output directory.

Can you change the code that is relying on a certain filename to look for the dialect name instead?

takteek
  • 7,020
  • 2
  • 39
  • 70