How to implement Flyway in a Javaee Maven project with Hibernate, vRaptor and JPA?

Asked

Viewed 156 times

3

In a project Maven, JPA, with Hibernate and vRaptor integrated, how to implement easily and effectively, the Flyway?

Implementing this, my bank will update how it was in developing the

<property name="hibernate.hbm2ddl.auto" value="update" />

or not?

  • 1

    The question is good, I do not understand the votes to close. Tiago, tried to configure Maven to use the plugin flyway-maven-plugin? You can configure this plugin to run it in one of the steps of Maven. I believe I can configure it to run before I upload your application (if I’m climbing via Maven). So it would act in a similar way to update of hbm2ddl

  • @Dherik and how to make this configuration?

  • I would like to know why you want me to close this issue when it is very relevant and I did not find any of this information on the Internet

  • 1

    Please do not close. I will write you an answer as soon as I can sit down a little in front of the PC. Other answers, of course, are very welcome. James, I think people are voting to close because of the "easy and effective way to implement". It gives the impression that you want an answer ready and are not putting enough research effort into the question. In advance, Flyway is an orthogonal technology to the others mentioned and it does not work exactly like hbm2ddl (prototyping tool) but rather as a "Git" for databases (versioning tool).

  • To complement Anthony, Tiago your database will always be the sequential execution of all flywaydb scripts in chronological order, it will never be the part-only application or the last script.

  • @Fláviogranato, yes I understand, but would have a good tutorial for implementing the same in the project Maven with Hibernate and vraptor? I opened the question more to make it available, and would have some design for this implementation?

  • @Anthonyaccioly did it?

  • 1

    Hi James, sorry, I haven’t finished writing the answer yet, but I’m working on it. Sorry for the delay.

Show 3 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.