/** * Return the file path to write the xml and sql to. */ protected File getMigrationDirectory() { // path to src/main/resources in typical maven project File resourceRootDir = new File(pathToResources); String resourcePath = migrationConfig.getMigrationPath(); // expect to be a path to something like - src/main/resources/dbmigration/model File path = new File(resourceRootDir, resourcePath); if (!path.exists()) { if (!path.mkdirs()) { logger.debug("Unable to ensure migration directory exists at {}", path.getAbsolutePath()); } } return path; }