Это даст вам возможность соединить maven шаги, просто добавьте туда нужные цели
<profile>
<id>clean-migrate</id>
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>process-resources1</id>
<goals>
<goal>resources</goal>
</goals>
<!-- Populate the database before querydsl-sql runs -->
<phase>generate-sources</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>com.googlecode.flyway</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<executions>
<execution>
<id>process-resources2</id>
<goals>
<goal>clean</goal>
<goal>migrate</goal>
</goals>
<phase>generate-sources</phase>
</execution>
</executions>
<version>1.4.2</version>
<configuration>
<driver>oracle.jdbc.driver.OracleDriver</driver>
<url>jdbc:oracle:thin:@${database-hostname}:${database-port}:${database-sid}</url>
<user>${database-username}</user>
<password>${database-password}</password>
<schemas>${database-schema}</schemas>
<table>schema_history</table>
<initialVersion>0.1.00</initialVersion>
<initialDescription>Base Migration</initialDescription>
</configuration>
</plugin>
</plugins>
</build>
</profile>
Вам также понадобится следующее в файле settings.xml
<profile>
<id>inject-flyway-properties</id>
<properties>
<database-hostname>${env.DB_HOSTNAME}</database-hostname>
<database-port>${env.DB_PORT}</database-port>
<database-username>${env.DB_USER}</database-username>
<database-password>${env.DB_PASSWORD}</database-password>
<database-sid>${env.DB_DEFAULT_SID}</database-sid>
<database-schema>${env.DB_SCHEMA}</database-schema>
</properties>
</profile>