Axel Fontaine is a software development expert and freelance consultant based in Munich. He is specialized in Continuous Delivery. He has extensive experience with the full software development lifecycle. He hates complexity with a passion. As an architect, developer, coach and consultant he helps his customers improve the way they develop and deliver software. To alleviate one of the traditional pain points, he started Flyway, the Agile Database Migration Framework for Java. He frequently speaks at Java User Groups. Axel is a DZone MVB and is not an employee of DZone and has posted 7 posts at DZone. You can read more from them at their website. View Full User Profile

Flyway 1.7 Released: Multiple locations, Spring now optional, improved JBoss, WebLogic & OSGi support

  • submit to reddit

 Flyway Logo


Flyway 1.7 is fresh out of the oven!

The highlights of this release are:

  • Support for multiple locations to load migrations from
  • Spring dependency is now optional
  • Improved JBoss, WebLogic & OSGi support 

Support for multiple locations to load migrations from

You can now specify a number of locations using the new flyway.locations property. This new property superseedes flyway.baseDir and flyway.basePackage, which have both been deprecated.

Flyway flyway = new Flyway();
flyway.setLocations("my/general/migrations", "my/specific/migrations");

This means you can now have additional locations for test data, or db-specific statements. Configuration has also been simplified as this new property worls for both SQL and Java migrations.

Spring dependency is now optional

Flyway can now run completely without Spring. This translates into a drastic reduction in dependency numbers and size for non-Spring users. For existing Spring users nothing changes, Spring Jdbc is still also supported out of the box for Java Migrations.

 Flyway Size

This brings some changes for Java Migrations. There is now a brand new JdbcMigration, which on depends on plain Jdbc API.

 public class V1_7__New_jdbc_migration implements JdbcMigration {
    public void migrate(Connection connection) throws Exception {
        PreparedStatement statement = connection.prepareStatement("INSERT INTO message (msg) VALUES ('Flyway rocks!')");
        try {
        } finally {

There is also a new SpringJdbcMigration, which superseedes the now deprecated JavaMigration. The new interface provides the same convenient support for Spring's JdbcTemplate as before.

Improved JBoss, WebLogic & OSGi support

Flyway's classpath scanning now supports

  • JBoss VFS v3 for loading migrations from within JBoss
  • zip URLs for loading migrations from within WebLogic
  • bundle* URLs for loading migrations within an Equinox OSGi environment like Eclipse RCP
Get it while it's hot:
Very special thanks to all contributors without whom this release wouldn't have been the same! Your issues reports and patches have been invaluable! Thank you!
Published at DZone with permission of Axel Fontaine, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)