Skip to content

Commit

Permalink
native image config for data modules
Browse files Browse the repository at this point in the history
  • Loading branch information
arjav-desai committed Jul 11, 2023
1 parent 68a7062 commit a5d67df
Show file tree
Hide file tree
Showing 43 changed files with 324 additions and 84 deletions.
4 changes: 2 additions & 2 deletions archetypes/helidon/src/main/archetype/mp/custom/database.xml
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ docker run --rm --name xe -p 1521:1521 -p 8888:8080 -e ORACLE_PWD=oracle wnamele
<value key="scope">runtime</value>
</map>
<map>
<value key="groupId">com.oracle.database.jdbc</value>
<value key="groupId">io.helidon.integrations.db</value>
<value key="artifactId">ucp</value>
<value key="scope">runtime</value>
</map>
Expand Down Expand Up @@ -431,7 +431,7 @@ docker run --rm --name xe -p 1521:1521 -p 8888:8080 -e ORACLE_PWD=oracle wnamele
<value key="artifactId">jakarta.xml.bind-api</value>
</map>
<map>
<value key="groupId">com.h2database</value>
<value key="groupId">io.helidon.integrations.db</value>
<value key="artifactId">h2</value>
</map>
<map>
Expand Down
12 changes: 6 additions & 6 deletions archetypes/helidon/src/main/archetype/se/custom/database.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ Instructions for H2 can be found here: https://www.h2database.com/html/cheatShee
</list>
<list key="dependencies">
<map>
<value key="groupId">com.h2database</value>
<value key="groupId">io.helidon.integrations.db</value>
<value key="artifactId">h2</value>
</map>
<map>
<value key="groupId">com.zaxxer</value>
<value key="artifactId">HikariCP</value>
<value key="groupId">io.helidon.integrations.db</value>
<value key="artifactId">hikaricp</value>
</map>
</list>
<value key="id">id</value>
Expand Down Expand Up @@ -180,7 +180,7 @@ docker run --rm --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -e MYSQL_D
<value key="scope">runtime</value>
</map>
<map>
<value key="groupId">com.h2database</value>
<value key="groupId">io.helidon.integrations.db</value>
<value key="artifactId">h2</value>
<value key="scope">test</value>
</map>
Expand Down Expand Up @@ -222,7 +222,7 @@ docker run --rm --name xe -p 1521:1521 -p 8888:8080 -e ORACLE_PWD=oracle wnamele
<value key="artifactId">ojdbc</value>
</map>
<map>
<value key="groupId">com.h2database</value>
<value key="groupId">io.helidon.integrations.db</value>
<value key="artifactId">h2</value>
<value key="scope">test</value>
</map>
Expand Down Expand Up @@ -263,7 +263,7 @@ docker run --rm --name mongo -p 27017:27017 mongo
<value key="artifactId">helidon-dbclient-mongodb</value>
</map>
<map>
<value key="groupId">com.h2database</value>
<value key="groupId">io.helidon.integrations.db</value>
<value key="artifactId">h2</value>
<value key="scope">test</value>
</map>
Expand Down
12 changes: 11 additions & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -802,14 +802,24 @@
</dependency>

<!-- integrations -->
<dependency>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>h2</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>hikaricp</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>ojdbc</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>h2</artifactId>
<artifactId>ucp</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions dbclient/jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
<artifactId>helidon-common-configurable</artifactId>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>hikaricp</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019, 2022 Oracle and/or its affiliates.
# Copyright (c) 2019, 2023 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,6 +14,4 @@
# limitations under the License.
#

Args= --initialize-at-build-time=org.slf4j \
--initialize-at-build-time=com.zaxxer.hikari \
--initialize-at-run-time=com.zaxxer.hikari.metrics.dropwizard.CodaHaleMetricsTracker
Args= --initialize-at-build-time=org.slf4j
4 changes: 2 additions & 2 deletions dbclient/metrics-jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
<artifactId>helidon-metrics</artifactId>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>hikaricp</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
Expand Down
4 changes: 2 additions & 2 deletions docs/se/dbclient.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////

Copyright (c) 2020, 2022 Oracle and/or its affiliates.
Copyright (c) 2020, 2023 Oracle and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -119,7 +119,7 @@ For the DB Client using JDBC implementation and H2 database, you must include th
<artifactId>helidon-dbclient-jdbc</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId> <!--3-->
<groupId>io.helidon.integrations.db</groupId> <!--3-->
<artifactId>h2</artifactId>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion examples/employee-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<artifactId>ojdbc</artifactId>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>ucp</artifactId>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion examples/integrations/cdi/datasource-hikaricp-h2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

<!-- Runtime-scoped dependencies. -->
<dependency>
<groupId>com.h2database</groupId>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion examples/integrations/cdi/jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

<!-- Runtime-scoped dependencies. -->
<dependency>
<groupId>com.h2database</groupId>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion examples/integrations/cdi/pokemons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

<!-- Runtime-scoped dependencies. -->
<dependency>
<groupId>com.h2database</groupId>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
Expand Down
4 changes: 2 additions & 2 deletions examples/integrations/micronaut/data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ curl -i http://localhost:8080/pets/s
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>ucp</artifactId>
<scope>runtime</scope>
</dependency>
Expand Down Expand Up @@ -112,7 +112,7 @@ curl -i http://localhost:8080/pets/s
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>ucp</artifactId>
<scope>runtime</scope>
</dependency>
Expand Down
7 changes: 1 addition & 6 deletions examples/integrations/micronaut/data/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,7 @@
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<!--
Use the following group id if native image is desired
Also make sure a remote database is used
-->
<!-- <groupId>io.helidon.integrations.db</groupId> -->
<groupId>io.helidon.integrations.db</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion examples/integrations/oci/atp-cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<artifactId>ojdbc</artifactId>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>ucp</artifactId>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion examples/integrations/oci/atp-reactive/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<artifactId>ojdbc</artifactId>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>ucp</artifactId>
</dependency>
<dependency>
Expand Down
6 changes: 3 additions & 3 deletions integrations/cdi/datasource-hikaricp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>hikaricp</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -90,7 +90,7 @@

<!-- Test-scoped dependencies. -->
<dependency>
<groupId>com.h2database</groupId>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020, 2022 Oracle and/or its affiliates.
# Copyright (c) 2020, 2023 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,6 +14,4 @@
# limitations under the License.
#

Args=--initialize-at-build-time=com.zaxxer.hikari \
--initialize-at-build-time=org.slf4j \
--initialize-at-run-time=com.zaxxer.hikari.metrics.dropwizard.CodaHaleMetricsTracker
Args=--initialize-at-build-time=org.slf4j
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
[
{
"name": "com.zaxxer.hikari.HikariConfig",
"allDeclaredConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true,
"allPublicFields": true
},
{
"name": "java.util.concurrent.CopyOnWriteArrayList",
"fields": [
Expand Down
11 changes: 8 additions & 3 deletions integrations/cdi/datasource-ucp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<dependencies>
<!-- Compile-scoped dependencies. -->
<dependency>
<groupId>${project.groupId}</groupId>
<groupId>io.helidon.integrations.cdi</groupId>
<artifactId>helidon-integrations-cdi-datasource</artifactId>
<scope>compile</scope>
</dependency>
Expand All @@ -46,7 +46,7 @@
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>ucp</artifactId>
<scope>compile</scope>
</dependency>
Expand Down Expand Up @@ -99,10 +99,15 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>ojdbc</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.helidon.microprofile.server</groupId>
<artifactId>helidon-microprofile-server</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"classes": [
"oracle.ucp.jdbc.PoolDataSource",
"oracle.ucp.jdbc.PoolDataSourceImpl",
"javax.sql.DataSource"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"bean-class": "io.helidon.integrations.datasource.ucp.cdi.UCPBackedDataSourceExtension",
"ifaces": [
"io.helidon.integrations.datasource.ucp.cdi.UCPBackedDataSourceExtension",
"oracle.ucp.jdbc.PoolDataSource",
"oracle.ucp.jdbc.PoolDataSourceImpl",
"javax.sql.DataSource"
]
}
]
2 changes: 1 addition & 1 deletion integrations/cdi/eclipselink-cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion integrations/cdi/jpa-cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@

<!-- Test-scoped dependencies. -->
<dependency>
<groupId>com.h2database</groupId>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
Expand Down
Loading

0 comments on commit a5d67df

Please sign in to comment.