Skip to content

Commit e740944

Browse files
authored
Replace OCI Java SDK shaded jar with v3 for OCI integration (helidon-io#5908)
1 parent 5be3a03 commit e740944

19 files changed

Lines changed: 873 additions & 401 deletions

File tree

dependencies/pom.xml

Lines changed: 744 additions & 1 deletion
Large diffs are not rendered by default.

docs/includes/oci.adoc

Lines changed: 0 additions & 59 deletions
This file was deleted.

docs/mp/integrations/oci.adoc

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
///////////////////////////////////////////////////////////////////////////////
22

3-
Copyright (c) 2021, 2022 Oracle and/or its affiliates.
3+
Copyright (c) 2021, 2023 Oracle and/or its affiliates.
44

55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.
@@ -35,9 +35,7 @@ include::{rootdir}/includes/mp.adoc[]
3535
3636
== Overview
3737
38-
Helidon MP OCI Integration provides easy access to Oracle Cloud Infrastructure using the OCI Java SDK.
39-
40-
NOTE: OCI SDK uses JAX-RS Client 2.1.6 (javax package names), which makes it incompatible with Helidon 3 applications and any application that uses JAX-RS 3 (jakarta package naming). See <<oci-compatibility, Resolving compatibility issue with OCI SDK>> for detailed information on how to work around this issue.
38+
Helidon MP OCI Integration provides easy access to Oracle Cloud Infrastructure using the OCI Java SDK.`
4139
4240
include::{rootdir}/includes/dependencies.adoc[]
4341
@@ -137,9 +135,7 @@ Once you have injected an ObjectStorage client you can use it as described in:
137135
* link:{oci-javasdk-objstore-javadoc-base-url}/package-summary.html[OCI SDK Object Storage Javadocs]
138136
* link:{oci-objstore-url}[OCI Object Storage Overview]
139137
140-
include::{rootdir}/includes/oci.adoc[leveloffset=+1]
141-
142138
== References
143139
144140
* link:{integration-oci-sdk-cdi-javadoc-base-url}/io/helidon/integrations/oci/sdk/cdi/OciExtension.html[OciExtension] Javadocs
145-
* link:{helidon-github-tree-url}/examples/integrations/oci[OCI SDK Usage Examples]
141+
* link:{helidon-github-tree-url}/examples/integrations/oci[OCI SDK Usage Examples]

docs/se/integrations/oci.adoc

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
///////////////////////////////////////////////////////////////////////////////
22

3-
Copyright (c) 2021, 2022 Oracle and/or its affiliates.
3+
Copyright (c) 2021, 2023 Oracle and/or its affiliates.
44

55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.
@@ -35,8 +35,6 @@ include::{rootdir}/includes/se.adoc[]
3535
3636
Helidon SE OCI Integration provides easy access to Oracle Cloud Infrastructure using the OCI Java SDK.
3737
38-
NOTE: OCI SDK uses JAX-RS Client 2.1.6 (javax package names), which makes it incompatible with Helidon 3 applications and any application that uses JAX-RS 3 (jakarta package naming). See <<oci-compatibility, Resolving compatibility issue with OCI SDK>> for detailed information on how to work around this issue.
39-
4038
== Usage
4139
4240
It is recommended that you use the OCI Java SDK directly, in particular the Async clients. All you need to do is configure and create an OCI SDK Client object. The configuration primarily
@@ -64,7 +62,8 @@ You also need to add the following dependency to your application for this
6462
----
6563
<dependency>
6664
<groupId>com.oracle.oci.sdk</groupId>
67-
<artifactId>oci-java-sdk-common</artifactId>
65+
<artifactId>oci-java-sdk-common-httpclient-jersey3</artifactId>
66+
<scope>runtime</scope>
6867
</dependency>
6968
----
7069
@@ -108,11 +107,8 @@ Once you have created an ObjectStorage client you can use it as described in:
108107
* link:{oci-javasdk-objstore-javadoc-base-url}/package-summary.html[OCI SDK Object Storage Javadocs]
109108
* link:{oci-objstore-url}[OCI Object Storage Overview]
110109
111-
112-
include::{rootdir}/includes/oci.adoc[leveloffset=+1]
113-
114110
== References
115111
116112
* link:{helidon-github-tree-url}/examples/integrations/oci[OCI SDK Usage Examples]
117113
* link:https://docs.oracle.com/en-us/iaas/Content/home.htm[OCI Documentation]
118-
]
114+
]
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
1-
# OCI SDK setup for Examples Build
2-
3-
OCI SDK uses JAX-RS Client 2.1.6 (javax package names), which makes it incompatible with Helidon 3 applications and any application that uses JAX-RS 3 (jakarta package naming).
4-
5-
Please see our [Guide](https://github.com/oracle/helidon/tree/master/docs/includes/oci.adoc) for detailed information on how to work around this issue.
6-
7-
Once you have this setup, you can build examples in this repository directory.
1+
# OCI Java SDK Examples

examples/integrations/oci/atp-cdi/pom.xml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright (c) 2021, 2022 Oracle and/or its affiliates.
4+
Copyright (c) 2021, 2023 Oracle and/or its affiliates.
55
66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.
@@ -33,16 +33,6 @@
3333
<name>Helidon Examples Integration OCI ATP CDI</name>
3434
<description>CDI integration with OCI ATP.</description>
3535

36-
<dependencyManagement>
37-
<dependencies>
38-
<dependency>
39-
<groupId>com.oracle.oci.sdk</groupId>
40-
<artifactId>oci-java-sdk-shaded-full</artifactId>
41-
<version>${version.lib.oci}</version>
42-
</dependency>
43-
</dependencies>
44-
</dependencyManagement>
45-
4636
<dependencies>
4737
<dependency>
4838
<groupId>io.helidon.microprofile.bundles</groupId>
@@ -64,12 +54,7 @@
6454
</dependency>
6555
<dependency>
6656
<groupId>com.oracle.oci.sdk</groupId>
67-
<artifactId>oci-java-sdk-shaded-full</artifactId>
68-
</dependency>
69-
<dependency>
70-
<groupId>org.slf4j</groupId>
71-
<artifactId>slf4j-jdk14</artifactId>
72-
<scope>runtime</scope>
57+
<artifactId>oci-java-sdk-database</artifactId>
7358
</dependency>
7459
<dependency>
7560
<groupId>io.helidon.config</groupId>

examples/integrations/oci/atp-cdi/src/main/java/io/helidon/examples/integrations/oci/atp/cdi/AtpResource.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, 2022 Oracle and/or its affiliates.
2+
* Copyright (c) 2021, 2023 Oracle and/or its affiliates.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -39,7 +39,7 @@
3939
import com.oracle.bmc.database.model.GenerateAutonomousDatabaseWalletDetails;
4040
import com.oracle.bmc.database.requests.GenerateAutonomousDatabaseWalletRequest;
4141
import com.oracle.bmc.database.responses.GenerateAutonomousDatabaseWalletResponse;
42-
import com.oracle.bmc.http.internal.ResponseHelper;
42+
import com.oracle.bmc.http.client.Options;
4343
import jakarta.inject.Inject;
4444
import jakarta.inject.Named;
4545
import jakarta.ws.rs.GET;
@@ -82,7 +82,7 @@ public class AtpResource {
8282
@GET
8383
@Path("/wallet")
8484
public Response generateWallet() {
85-
ResponseHelper.shouldAutoCloseResponseInputStream(false);
85+
Options.shouldAutoCloseResponseInputStream(false);
8686
GenerateAutonomousDatabaseWalletResponse walletResponse =
8787
databaseClient.generateAutonomousDatabaseWallet(
8888
GenerateAutonomousDatabaseWalletRequest.builder()

examples/integrations/oci/atp-reactive/pom.xml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright (c) 2021, 2022 Oracle and/or its affiliates.
4+
Copyright (c) 2021, 2023 Oracle and/or its affiliates.
55
66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.
@@ -37,16 +37,6 @@
3737
<mainClass>io.helidon.examples.integrations.oci.atp.reactive.OciAtpMain</mainClass>
3838
</properties>
3939

40-
<dependencyManagement>
41-
<dependencies>
42-
<dependency>
43-
<groupId>com.oracle.oci.sdk</groupId>
44-
<artifactId>oci-java-sdk-shaded-full</artifactId>
45-
<version>${version.lib.oci}</version>
46-
</dependency>
47-
</dependencies>
48-
</dependencyManagement>
49-
5040
<dependencies>
5141
<dependency>
5242
<groupId>io.helidon.reactive.webserver</groupId>
@@ -71,11 +61,11 @@
7161
</dependency>
7262
<dependency>
7363
<groupId>com.oracle.oci.sdk</groupId>
74-
<artifactId>oci-java-sdk-shaded-full</artifactId>
64+
<artifactId>oci-java-sdk-database</artifactId>
7565
</dependency>
7666
<dependency>
77-
<groupId>org.slf4j</groupId>
78-
<artifactId>slf4j-jdk14</artifactId>
67+
<groupId>com.oracle.oci.sdk</groupId>
68+
<artifactId>oci-java-sdk-common-httpclient-jersey3</artifactId>
7969
<scope>runtime</scope>
8070
</dependency>
8171
</dependencies>

examples/integrations/oci/metrics-reactive/pom.xml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright (c) 2021, 2022 Oracle and/or its affiliates.
4+
Copyright (c) 2021, 2023 Oracle and/or its affiliates.
55
66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.
@@ -37,16 +37,6 @@
3737
<name>Helidon Examples Integration OCI Metrics Reactive</name>
3838
<description>Reactive integration with OCI Metrics.</description>
3939

40-
<dependencyManagement>
41-
<dependencies>
42-
<dependency>
43-
<groupId>com.oracle.oci.sdk</groupId>
44-
<artifactId>oci-java-sdk-shaded-full</artifactId>
45-
<version>${version.lib.oci}</version>
46-
</dependency>
47-
</dependencies>
48-
</dependencyManagement>
49-
5040
<dependencies>
5141
<dependency>
5242
<groupId>io.helidon.reactive.webserver</groupId>
@@ -58,11 +48,11 @@
5848
</dependency>
5949
<dependency>
6050
<groupId>com.oracle.oci.sdk</groupId>
61-
<artifactId>oci-java-sdk-shaded-full</artifactId>
51+
<artifactId>oci-java-sdk-monitoring</artifactId>
6252
</dependency>
6353
<dependency>
64-
<groupId>org.slf4j</groupId>
65-
<artifactId>slf4j-jdk14</artifactId>
54+
<groupId>com.oracle.oci.sdk</groupId>
55+
<artifactId>oci-java-sdk-common-httpclient-jersey3</artifactId>
6656
<scope>runtime</scope>
6757
</dependency>
6858
</dependencies>

examples/integrations/oci/objectstorage-cdi/pom.xml

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright (c) 2021, 2022 Oracle and/or its affiliates.
4+
Copyright (c) 2021, 2023 Oracle and/or its affiliates.
55
66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.
@@ -37,16 +37,6 @@
3737
<mainClass>io.helidon.examples.integrations.oci.objectstorage.cdi.ObjectStorageCdiMain</mainClass>
3838
</properties>
3939

40-
<dependencyManagement>
41-
<dependencies>
42-
<dependency>
43-
<groupId>com.oracle.oci.sdk</groupId>
44-
<artifactId>oci-java-sdk-shaded-full</artifactId>
45-
<version>${version.lib.oci}</version>
46-
</dependency>
47-
</dependencies>
48-
</dependencyManagement>
49-
5040
<dependencies>
5141
<dependency>
5242
<groupId>io.helidon.microprofile.bundles</groupId>
@@ -55,16 +45,10 @@
5545
<dependency>
5646
<groupId>io.helidon.integrations.oci.sdk</groupId>
5747
<artifactId>helidon-integrations-oci-sdk-cdi</artifactId>
58-
<scope>runtime</scope>
5948
</dependency>
6049
<dependency>
6150
<groupId>com.oracle.oci.sdk</groupId>
62-
<artifactId>oci-java-sdk-shaded-full</artifactId>
63-
</dependency>
64-
<dependency>
65-
<groupId>org.slf4j</groupId>
66-
<artifactId>slf4j-jdk14</artifactId>
67-
<scope>runtime</scope>
51+
<artifactId>oci-java-sdk-objectstorage</artifactId>
6852
</dependency>
6953
<dependency>
7054
<groupId>io.helidon.config</groupId>

0 commit comments

Comments
 (0)