flyway/flyway — pull request #18 by jonrtodd (2013-03-29 07:00:27+00:00)
Title: Allow custom resolvers

This is a pass at allowing for custom MigrationResolvers as discussed in this ticket:
http://code.google.com/p/flyway/issues/detail?id=469

With this these changes, creating the command line tool which uses both the default resolvers and a custom resolver looks like this:

```java
Flyway flyway = new Flyway();
flyway.configure(properties);

//
// Resolvers
//

Locations sqlMigrationLocations = getMigrationLocationsForKey(properties, "flyway.locations");
Locations metadataMigrationLocations = getMigrationLocationsForKey(properties, "app_metadata_locations");

Collection resolvers = new LinkedList();

// Default migration resolvers
MigrationResolver defaultMigrationResolver = Flyway.newDefaultMigrationResolver(
sqlMigrationLocations, flyway.getEncoding(), flyway.getSqlMigrationPrefix(),
flyway.getSqlMigrationSuffix(), flyway.getPlaceholders(), flyway.getPlaceholderPrefix(), flyway.getPlaceholderSuffix());
resolvers.add(defaultMigrationResolver);

// Metadata migration resolvers
for (Location location : metadataMigrationLocations.getLocations()) {
MetadataMigrationResolver metadataMigrationResolver = new AppMetadataMigrationResolver(location, METADATA_MIGRATION_PREFIX, METADATA_MIGRATION_SUFFIX);
resolvers.add(metadataMigrationResolver);
}

flyway.setMigrationResolvers(resolvers);

executeOperation(flyway, operation);
```

Additional details are in the individual commit messages.

Look forward to your feedback!