I have a Maven project with the Flyway Plugin. This Project should test the function of Flyway with a PostgreSQL Database. I got the Testdrive for the Teams Edition. I am also able to execute every Flyway-Goal also undo. The commands I execute looks like following mvn flyway:undo and it works fine.
What i want to execute: mvn flyway:undo -cherryPick=2 or mvn flyway:undo -cherryPick=1.2
Anyway when i want to add cherryPick in my pom.xml file with:
<configuration>
<cherryPick>2.0</cherryPick>
</configuration>
I use: apache-maven 3.6.1
I got following Error, no matter which command i try. Error also occurs when executing Flyway-Goals for Community Edition.
...
[ERROR] Failed to execute goal org.flywaydb.enterprise:flyway-maven-plugin:8.5.10:info (default-cli) on project flyway-demo: org.flywaydb.core.api.FlywayException: No matching migrations found for pattern: 2.0 -> [Help 1
]
...
Here my pom.xml file:
<dependencies>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>8.5.10</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sql-maven-plugin</artifactId>
<version>1.5</version>
</plugin>
<plugin>
<groupId>org.flywaydb.enterprise</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>8.5.10</version>
<configuration>
<licenseKey>...</licenseKey>
<url>Database-url</url>
<user>user</user>
<password>pw</password>
<driver>Database.Driver</driver>
<locations>
<location>filesystem:src/main/resources/db/migration</location>
</locations>
<outOfOrder>true</outOfOrder>
<cherryPick>1.2</cherryPick>
</configuration>
<dependencies>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.2.6</version>
</dependency>
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.1-901-1.jdbc4</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
My directory for the SQL-Migrations: src-diretory for migration
I also tried to name the versions like: V0__C..., V1__A..,U0__D.., usw
Can someone help me out here? I look also already alot on https://flywaydb.org/documentation/configuration/parameters/ but found nothing...