Over a million developers have joined DZone.

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


 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: http://code.google.com/p/flyway/

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!



{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}