exclude unused database dependencies from final artifact

This commit is contained in:
Athou
2024-09-13 10:20:19 +02:00
parent 6297463445
commit 86a3cb67f2

View File

@@ -163,6 +163,29 @@
<quarkus.datasource.db-kind>${build.database}</quarkus.datasource.db-kind> <quarkus.datasource.db-kind>${build.database}</quarkus.datasource.db-kind>
</systemPropertyVariables> </systemPropertyVariables>
</configuration> </configuration>
<!-- failsafe plugin does not seem to be able to pick up dependencies declared in profiles -->
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-h2</artifactId>
<version>${quarkus.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-mysql</artifactId>
<version>${quarkus.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-mariadb</artifactId>
<version>${quarkus.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-postgresql</artifactId>
<version>${quarkus.version}</version>
</dependency>
</dependencies>
</plugin> </plugin>
<plugin> <plugin>
<groupId>io.github.git-commit-id</groupId> <groupId>io.github.git-commit-id</groupId>
@@ -323,22 +346,6 @@
<groupId>io.quarkus</groupId> <groupId>io.quarkus</groupId>
<artifactId>quarkus-liquibase</artifactId> <artifactId>quarkus-liquibase</artifactId>
</dependency> </dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-h2</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-mysql</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-mariadb</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-postgresql</artifactId>
</dependency>
<dependency> <dependency>
<groupId>io.quarkus</groupId> <groupId>io.quarkus</groupId>
<artifactId>quarkus-extension-processor</artifactId> <artifactId>quarkus-extension-processor</artifactId>
@@ -522,24 +529,48 @@
<properties> <properties>
<build.database>h2</build.database> <build.database>h2</build.database>
</properties> </properties>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-h2</artifactId>
</dependency>
</dependencies>
</profile> </profile>
<profile> <profile>
<id>mysql</id> <id>mysql</id>
<properties> <properties>
<build.database>mysql</build.database> <build.database>mysql</build.database>
</properties> </properties>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-mysql</artifactId>
</dependency>
</dependencies>
</profile> </profile>
<profile> <profile>
<id>mariadb</id> <id>mariadb</id>
<properties> <properties>
<build.database>mariadb</build.database> <build.database>mariadb</build.database>
</properties> </properties>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-mariadb</artifactId>
</dependency>
</dependencies>
</profile> </profile>
<profile> <profile>
<id>postgresql</id> <id>postgresql</id>
<properties> <properties>
<build.database>postgresql</build.database> <build.database>postgresql</build.database>
</properties> </properties>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-postgresql</artifactId>
</dependency>
</dependencies>
</profile> </profile>
</profiles> </profiles>
</project> </project>