Where to execute Flyway.migrate()?
<p>I am developing my JAX-RS application using Hibernate JPA, with settings like <code>hibernate.hbm2ddl.auto='create-drop'</code> to create the table in my postgresql db.</p>

<p>Obviously, this is catastrophic in production.</p>

<p>Recently, I discovered Flyway, and would like to give it a try. It has a few approach to migrate the changes, like command-line or API.</p>

<p>If I am not mistaken, command-line approach requires me to execute the changes separately, while the API approach will execute the migration automatically. However, where is the <code>main</code> function in JAXRS application?</p>

<p>Hope my question is clear enough.</p>