From 91be3244f231028cfb4b1dca862ad32a112662ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carlos=20Valero=20S=C3=A1nchez?= Date: Sat, 30 Dec 2017 05:05:05 +0100 Subject: [PATCH] Consolidate flyway modules (#3319) --- flyway/flyway-callbacks/.gitignore | 24 ----- flyway/flyway-callbacks/pom.xml | 58 ---------- flyway/pom.xml | 102 ++++++++++++------ .../ExampleFlywayCallback.java | 0 .../flywaycallbacks/FlywayApplication.java | 0 .../src/main/resources/application.properties | 0 .../db/callbacks/beforeEachMigrate.sql | 0 .../resources/db/callbacks/beforeMigrate.sql | 0 .../db/migration/V1_0__add_table_one.sql | 0 .../db/migration/V1_1__add_table_two.sql | 0 .../src/main/resources/logback.xml | 0 .../FlywayApplicationTest.java | 0 .../FlywayCallbackTestConfig.java | 0 13 files changed, 69 insertions(+), 115 deletions(-) delete mode 100644 flyway/flyway-callbacks/.gitignore delete mode 100644 flyway/flyway-callbacks/pom.xml rename flyway/{flyway-callbacks => }/src/main/java/com/baeldung/flywaycallbacks/ExampleFlywayCallback.java (100%) rename flyway/{flyway-callbacks => }/src/main/java/com/baeldung/flywaycallbacks/FlywayApplication.java (100%) rename flyway/{flyway-callbacks => }/src/main/resources/application.properties (100%) rename flyway/{flyway-callbacks => }/src/main/resources/db/callbacks/beforeEachMigrate.sql (100%) rename flyway/{flyway-callbacks => }/src/main/resources/db/callbacks/beforeMigrate.sql (100%) rename flyway/{flyway-callbacks => }/src/main/resources/db/migration/V1_0__add_table_one.sql (100%) rename flyway/{flyway-callbacks => }/src/main/resources/db/migration/V1_1__add_table_two.sql (100%) rename flyway/{flyway-callbacks => }/src/main/resources/logback.xml (100%) rename flyway/{flyway-callbacks => }/src/test/java/com/baeldung/flywaycallbacks/FlywayApplicationTest.java (100%) rename flyway/{flyway-callbacks => }/src/test/java/com/baeldung/flywaycallbacks/FlywayCallbackTestConfig.java (100%) diff --git a/flyway/flyway-callbacks/.gitignore b/flyway/flyway-callbacks/.gitignore deleted file mode 100644 index 2af7cefb0a..0000000000 --- a/flyway/flyway-callbacks/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -target/ -!.mvn/wrapper/maven-wrapper.jar - -### STS ### -.apt_generated -.classpath -.factorypath -.project -.settings -.springBeans - -### IntelliJ IDEA ### -.idea -*.iws -*.iml -*.ipr - -### NetBeans ### -nbproject/private/ -build/ -nbbuild/ -dist/ -nbdist/ -.nb-gradle/ \ No newline at end of file diff --git a/flyway/flyway-callbacks/pom.xml b/flyway/flyway-callbacks/pom.xml deleted file mode 100644 index 9506c2c0c9..0000000000 --- a/flyway/flyway-callbacks/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - 4.0.0 - - flyway-callbacks - jar - - flyway-callbacks - Flyway Callbacks Demo - - - parent-boot-5 - com.baeldung - 0.0.1-SNAPSHOT - ../../parent-boot-5 - - - - UTF-8 - UTF-8 - 1.8 - - - - - org.flywaydb - flyway-core - 5.0.2 - - - - org.springframework.boot - spring-boot-starter-jdbc - - - - com.h2database - h2 - - - org.springframework.boot - spring-boot-starter-test - test - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - - diff --git a/flyway/pom.xml b/flyway/pom.xml index c3806ed3bd..a090b9458e 100644 --- a/flyway/pom.xml +++ b/flyway/pom.xml @@ -1,34 +1,70 @@ + - 4.0.0 - com.baeldung - flyway - 1.0 - flyway - A sample project to demonstrate Flyway migrations - - - mysql - mysql-connector-java - 6.0.3 - - - - - - org.flywaydb - flyway-maven-plugin - 4.0.3 - - - org.apache.maven.plugins - maven-compiler-plugin - 3.5.1 - - 1.8 - 1.8 - - - - - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + + flyway + jar + + flyway + Flyway Callbacks Demo + + + parent-boot-5 + com.baeldung + 0.0.1-SNAPSHOT + ../parent-boot-5 + + + + UTF-8 + UTF-8 + 1.8 + + + + + org.flywaydb + flyway-core + 5.0.2 + + + + org.springframework.boot + spring-boot-starter-jdbc + + + + mysql + mysql-connector-java + 6.0.3 + + + + com.h2database + h2 + test + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + org.flywaydb + flyway-maven-plugin + 5.0.2 + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + diff --git a/flyway/flyway-callbacks/src/main/java/com/baeldung/flywaycallbacks/ExampleFlywayCallback.java b/flyway/src/main/java/com/baeldung/flywaycallbacks/ExampleFlywayCallback.java similarity index 100% rename from flyway/flyway-callbacks/src/main/java/com/baeldung/flywaycallbacks/ExampleFlywayCallback.java rename to flyway/src/main/java/com/baeldung/flywaycallbacks/ExampleFlywayCallback.java diff --git a/flyway/flyway-callbacks/src/main/java/com/baeldung/flywaycallbacks/FlywayApplication.java b/flyway/src/main/java/com/baeldung/flywaycallbacks/FlywayApplication.java similarity index 100% rename from flyway/flyway-callbacks/src/main/java/com/baeldung/flywaycallbacks/FlywayApplication.java rename to flyway/src/main/java/com/baeldung/flywaycallbacks/FlywayApplication.java diff --git a/flyway/flyway-callbacks/src/main/resources/application.properties b/flyway/src/main/resources/application.properties similarity index 100% rename from flyway/flyway-callbacks/src/main/resources/application.properties rename to flyway/src/main/resources/application.properties diff --git a/flyway/flyway-callbacks/src/main/resources/db/callbacks/beforeEachMigrate.sql b/flyway/src/main/resources/db/callbacks/beforeEachMigrate.sql similarity index 100% rename from flyway/flyway-callbacks/src/main/resources/db/callbacks/beforeEachMigrate.sql rename to flyway/src/main/resources/db/callbacks/beforeEachMigrate.sql diff --git a/flyway/flyway-callbacks/src/main/resources/db/callbacks/beforeMigrate.sql b/flyway/src/main/resources/db/callbacks/beforeMigrate.sql similarity index 100% rename from flyway/flyway-callbacks/src/main/resources/db/callbacks/beforeMigrate.sql rename to flyway/src/main/resources/db/callbacks/beforeMigrate.sql diff --git a/flyway/flyway-callbacks/src/main/resources/db/migration/V1_0__add_table_one.sql b/flyway/src/main/resources/db/migration/V1_0__add_table_one.sql similarity index 100% rename from flyway/flyway-callbacks/src/main/resources/db/migration/V1_0__add_table_one.sql rename to flyway/src/main/resources/db/migration/V1_0__add_table_one.sql diff --git a/flyway/flyway-callbacks/src/main/resources/db/migration/V1_1__add_table_two.sql b/flyway/src/main/resources/db/migration/V1_1__add_table_two.sql similarity index 100% rename from flyway/flyway-callbacks/src/main/resources/db/migration/V1_1__add_table_two.sql rename to flyway/src/main/resources/db/migration/V1_1__add_table_two.sql diff --git a/flyway/flyway-callbacks/src/main/resources/logback.xml b/flyway/src/main/resources/logback.xml similarity index 100% rename from flyway/flyway-callbacks/src/main/resources/logback.xml rename to flyway/src/main/resources/logback.xml diff --git a/flyway/flyway-callbacks/src/test/java/com/baeldung/flywaycallbacks/FlywayApplicationTest.java b/flyway/src/test/java/com/baeldung/flywaycallbacks/FlywayApplicationTest.java similarity index 100% rename from flyway/flyway-callbacks/src/test/java/com/baeldung/flywaycallbacks/FlywayApplicationTest.java rename to flyway/src/test/java/com/baeldung/flywaycallbacks/FlywayApplicationTest.java diff --git a/flyway/flyway-callbacks/src/test/java/com/baeldung/flywaycallbacks/FlywayCallbackTestConfig.java b/flyway/src/test/java/com/baeldung/flywaycallbacks/FlywayCallbackTestConfig.java similarity index 100% rename from flyway/flyway-callbacks/src/test/java/com/baeldung/flywaycallbacks/FlywayCallbackTestConfig.java rename to flyway/src/test/java/com/baeldung/flywaycallbacks/FlywayCallbackTestConfig.java