Open balteo opened 10 years ago
I am not sure, if I understood right, what you would like to do. Would it be sufficient, if hibernate4-maven-plugin would automatically add the version-string of the project to the configured name of the outputFile?
@juplo This would be great yes as long as they meet the above version requirements (see quote above). And also one should be able to have several files with incremental version numbers. These files could later be fed to Flyway for a DB migration. Do you see what I mean?
Whether the version string meets the flyway-requirements, or not, would depend on you: you define the version of your project in the pom.xml of your project. The same would go for several versions of that file: if you would increase the version of your project in your pom.xml and do not delete the old files (with a "mvn clean"), you would end up with what your are looking for...
I think Juplo hibernate4-maven-plugin could be used a part of a continuous delivery toolchain together with DB migration tools such as Flyway.
Instead of relying on Hibernate's out-of-the-box hbm2ddl feature, one could use Juplo plugin in order to generate the SQL migration scripts that would later be applied by Flyway.
However, as of now and for the above to work, it seems one has to rename the Juplo-generated scripts manually so that they follow Flyway's migration naming requirements i.e.
See here for documentation.
Therefore, it would be great if the Juplo plugin could somehow - and upon activation/configuration - manage different versions/names of its
outputFile
parameter that would follow the above specification/requirements (or a subset thereof).One would eventually end up with N generated files that would could easily be consumed by Flyway for its DB migrations.