Skip to content

Commit 6d70b84

Browse files
authored
Merge pull request #41583 from geoand/#41580
Make flyway and jdbc-postgresql extensions work without any other required dependencies
2 parents 1e40072 + ddf8453 commit 6d70b84

File tree

11 files changed

+192
-4
lines changed

11 files changed

+192
-4
lines changed

bom/application/pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,6 +1015,16 @@
10151015
<artifactId>quarkus-flyway-deployment</artifactId>
10161016
<version>${project.version}</version>
10171017
</dependency>
1018+
<dependency>
1019+
<groupId>io.quarkus</groupId>
1020+
<artifactId>quarkus-flyway-postgresql</artifactId>
1021+
<version>${project.version}</version>
1022+
</dependency>
1023+
<dependency>
1024+
<groupId>io.quarkus</groupId>
1025+
<artifactId>quarkus-flyway-postgresql-deployment</artifactId>
1026+
<version>${project.version}</version>
1027+
</dependency>
10181028
<dependency>
10191029
<groupId>io.quarkus</groupId>
10201030
<artifactId>quarkus-liquibase</artifactId>

devtools/bom-descriptor-json/pom.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,19 @@
590590
</exclusion>
591591
</exclusions>
592592
</dependency>
593+
<dependency>
594+
<groupId>io.quarkus</groupId>
595+
<artifactId>quarkus-flyway-postgresql</artifactId>
596+
<version>${project.version}</version>
597+
<type>pom</type>
598+
<scope>test</scope>
599+
<exclusions>
600+
<exclusion>
601+
<groupId>*</groupId>
602+
<artifactId>*</artifactId>
603+
</exclusion>
604+
</exclusions>
605+
</dependency>
593606
<dependency>
594607
<groupId>io.quarkus</groupId>
595608
<artifactId>quarkus-funqy-amazon-lambda</artifactId>

docs/pom.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,19 @@
602602
</exclusion>
603603
</exclusions>
604604
</dependency>
605+
<dependency>
606+
<groupId>io.quarkus</groupId>
607+
<artifactId>quarkus-flyway-postgresql-deployment</artifactId>
608+
<version>${project.version}</version>
609+
<type>pom</type>
610+
<scope>test</scope>
611+
<exclusions>
612+
<exclusion>
613+
<groupId>*</groupId>
614+
<artifactId>*</artifactId>
615+
</exclusion>
616+
</exclusions>
617+
</dependency>
605618
<dependency>
606619
<groupId>io.quarkus</groupId>
607620
<artifactId>quarkus-funqy-amazon-lambda-deployment</artifactId>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<artifactId>quarkus-flyway-postgresql-parent</artifactId>
7+
<groupId>io.quarkus</groupId>
8+
<version>999-SNAPSHOT</version>
9+
</parent>
10+
<modelVersion>4.0.0</modelVersion>
11+
12+
<artifactId>quarkus-flyway-postgresql-deployment</artifactId>
13+
<name>Quarkus - Flyway - PostgreSQL - Deployment</name>
14+
<description>This extensions is added by Quarkus automatically when quarkus-flyway and quarkus-jdbc-postgresql are on the classpath</description>
15+
16+
<dependencies>
17+
<dependency>
18+
<groupId>io.quarkus</groupId>
19+
<artifactId>quarkus-core-deployment</artifactId>
20+
</dependency>
21+
22+
<dependency>
23+
<groupId>io.quarkus</groupId>
24+
<artifactId>quarkus-flyway-postgresql</artifactId>
25+
</dependency>
26+
</dependencies>
27+
28+
<build>
29+
<plugins>
30+
<plugin>
31+
<artifactId>maven-compiler-plugin</artifactId>
32+
<configuration>
33+
<annotationProcessorPaths>
34+
<path>
35+
<groupId>io.quarkus</groupId>
36+
<artifactId>quarkus-extension-processor</artifactId>
37+
<version>${project.version}</version>
38+
</path>
39+
</annotationProcessorPaths>
40+
</configuration>
41+
</plugin>
42+
</plugins>
43+
</build>
44+
45+
46+
</project>

extensions/flyway-postgresql/pom.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
6+
<parent>
7+
<artifactId>quarkus-extensions-parent</artifactId>
8+
<groupId>io.quarkus</groupId>
9+
<version>999-SNAPSHOT</version>
10+
<relativePath>../pom.xml</relativePath>
11+
</parent>
12+
<modelVersion>4.0.0</modelVersion>
13+
14+
<artifactId>quarkus-flyway-postgresql-parent</artifactId>
15+
<name>Quarkus - Flyway - PostgreSQL</name>
16+
<packaging>pom</packaging>
17+
<modules>
18+
<module>runtime</module>
19+
<module>deployment</module>
20+
</modules>
21+
</project>
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<artifactId>quarkus-flyway-postgresql-parent</artifactId>
7+
<groupId>io.quarkus</groupId>
8+
<version>999-SNAPSHOT</version>
9+
</parent>
10+
<modelVersion>4.0.0</modelVersion>
11+
12+
<artifactId>quarkus-flyway-postgresql</artifactId>
13+
<name>Quarkus Flyway - PostgreSQL - Runtime</name>
14+
<description>This extensions is added by Quarkus automatically when quarkus-flyway and quarkus-jdbc-postgresql are on the classpath</description>
15+
16+
<dependencies>
17+
<dependency>
18+
<groupId>io.quarkus</groupId>
19+
<artifactId>quarkus-core</artifactId>
20+
</dependency>
21+
<dependency>
22+
<groupId>io.quarkus</groupId>
23+
<artifactId>quarkus-flyway</artifactId>
24+
<scope>provided</scope>
25+
</dependency>
26+
<dependency>
27+
<groupId>org.flywaydb</groupId>
28+
<artifactId>flyway-database-postgresql</artifactId>
29+
</dependency>
30+
</dependencies>
31+
32+
<build>
33+
<plugins>
34+
<plugin>
35+
<groupId>io.quarkus</groupId>
36+
<artifactId>quarkus-extension-maven-plugin</artifactId>
37+
<executions>
38+
<execution>
39+
<phase>compile</phase>
40+
<goals>
41+
<goal>extension-descriptor</goal>
42+
</goals>
43+
<configuration>
44+
<deployment>${project.groupId}:${project.artifactId}-deployment:${project.version}</deployment>
45+
<dependencyCondition>
46+
<artifact>io.quarkus:quarkus-flyway</artifact>
47+
</dependencyCondition>
48+
</configuration>
49+
</execution>
50+
</executions>
51+
</plugin>
52+
<plugin>
53+
<artifactId>maven-compiler-plugin</artifactId>
54+
<configuration>
55+
<annotationProcessorPaths>
56+
<path>
57+
<groupId>io.quarkus</groupId>
58+
<artifactId>quarkus-extension-processor</artifactId>
59+
<version>${project.version}</version>
60+
</path>
61+
</annotationProcessorPaths>
62+
</configuration>
63+
</plugin>
64+
</plugins>
65+
</build>
66+
67+
68+
</project>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name: Quarkus Flyway PostgreSQL
2+
artifact: ${project.groupId}:${project.artifactId}:${project.version}
3+
description: Conditional extension added when Flyway and PostgreSQL extensions are present
4+
metadata:
5+
unlisted: true
6+

extensions/jdbc/jdbc-postgresql/deployment/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@
3333
<groupId>io.quarkus</groupId>
3434
<artifactId>quarkus-jdbc-postgresql</artifactId>
3535
</dependency>
36+
37+
<dependency>
38+
<groupId>io.quarkus</groupId>
39+
<artifactId>quarkus-flyway-postgresql-deployment</artifactId>
40+
<optional>true</optional> <!-- conditional dependency -->
41+
</dependency>
42+
3643
<dependency>
3744
<groupId>io.quarkus</groupId>
3845
<artifactId>quarkus-agroal-deployment</artifactId>

extensions/jdbc/jdbc-postgresql/runtime/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@
3636
<artifactId>quarkus-kubernetes-service-binding</artifactId>
3737
<optional>true</optional>
3838
</dependency>
39+
40+
<dependency>
41+
<groupId>io.quarkus</groupId>
42+
<artifactId>quarkus-flyway-postgresql</artifactId>
43+
<optional>true</optional> <!-- conditional dependency -->
44+
</dependency>
45+
3946
<dependency>
4047
<groupId>io.quarkus</groupId>
4148
<artifactId>quarkus-junit5-internal</artifactId>

extensions/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@
187187

188188
<!-- Database migrations -->
189189
<module>flyway</module>
190+
<module>flyway-postgresql</module>
190191
<module>liquibase</module>
191192
<module>liquibase-mongodb</module>
192193

integration-tests/hibernate-search-orm-elasticsearch-tenancy/pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@
3131
<groupId>io.quarkus</groupId>
3232
<artifactId>quarkus-flyway</artifactId>
3333
</dependency>
34-
<dependency>
35-
<groupId>org.flywaydb</groupId>
36-
<artifactId>flyway-database-postgresql</artifactId>
37-
</dependency>
3834
<dependency>
3935
<groupId>io.quarkus</groupId>
4036
<artifactId>quarkus-resteasy</artifactId>

0 commit comments

Comments
 (0)