Skip to content

Commit 7246eae

Browse files
committed
Syncing git hub with Bitbucket latest
1 parent 80769fb commit 7246eae

File tree

56 files changed

+1019
-198
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1019
-198
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ target/
1212
Thumbs.db
1313
ocibuild.conf
1414
sca-config.json
15+
input_ocibuild*
16+
output_ocibuild*

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ clean:
1515
mvnd clean
1616

1717
docs:
18-
mvnd verify -Pdocs -DskipTests=true
18+
mvnd verify -Pasciidocs -DskipTests=true
1919

2020
javadocs:
2121
mvnd clean package javadoc:aggregate -DskipTests=true -e

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ Spring Cloud for OCI, eases the integration with OCI services with the help of O
1313

1414
All Spring Cloud for OCI artifacts are made available through Maven Central. Developers can bootstrap their application with Spring Initializr and add the OCI Support dependency. With Spring Cloud for OCI, the developers only need to add some annotations and a small number of configurations to connect Spring Cloud applications to the OCI services.
1515

16+
## Compatibility with Spring Project Versions
17+
18+
This project has dependency and transitive dependencies on Spring Projects. The table below outlines the versions of Spring Cloud, Spring Boot and Spring Framework versions that are compatible with certain Spring Cloud OCI version.
19+
20+
| Spring Cloud OCI | Spring Cloud | Spring Boot | Spring Framework | OCI Java SDK |
21+
|-------------------|-----------------|---------------------|------------------|--------------|
22+
| 1.0.0 | <to-be-checked> | 2.7.x, 3.0.x, 3.1.x | 5.3.23 | 3.19.0 |
23+
24+
1625
## Try out samples
1726
You may checkout samples for the each service supported by Spring Cloud OCI below.
1827

@@ -62,14 +71,6 @@ make format
6271

6372
## Documentation
6473

65-
Generate usage documentation with below command
66-
67-
```
68-
make docs
69-
```
70-
71-
Output generated at `docs/target/generated-docs/`
72-
7374
Java docs can be generated with below command
7475

7576
```

SECURITY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
# Reporting security vulnerabilities
23

34
Oracle values the independent security research community and believes that
@@ -21,7 +22,7 @@ security features are welcome on GitHub Issues.
2122

2223
Security updates will be released on a regular cadence. Many of our projects
2324
will typically release security fixes in conjunction with the
24-
Oracle Critical Patch Update program. Additional
25+
[Oracle Critical Patch Update][3] program. Additional
2526
information, including past advisories, is available on our [security alerts][4]
2627
page.
2728

docs/generate-docs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# This command regenerates the docs after editing.
77
# You'll have to run this after editing the src/main/asciidoc/README.adoc
88

9-
../mvnw clean install -Pdocs
9+
mvn clean install -Pasciidocs

docs/pom.xml

Lines changed: 78 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ Licensed under the Universal Permissive License v 1.0 as shown at https://oss.or
3636

3737
<!--maven-resources-plugin:3.2.0:copy-resources fails: https://issues.apache.org/jira/browse/MSHARED-966-->
3838
<maven-resources-plugin.version>3.3.0</maven-resources-plugin.version>
39+
<asciidoctor.maven.plugin.version>2.2.4</asciidoctor.maven.plugin.version>
40+
<asciidoctorj.version>2.5.10</asciidoctorj.version>
41+
<jruby.version>9.4.2.0</jruby.version>
3942
</properties>
4043

4144
<repositories>
@@ -61,36 +64,89 @@ Licensed under the Universal Permissive License v 1.0 as shown at https://oss.or
6164

6265
<profiles>
6366
<profile>
64-
<id>docs</id>
67+
<id>asciidocs</id>
6568
<build>
6669
<plugins>
67-
<plugin>
68-
<groupId>pl.project13.maven</groupId>
69-
<artifactId>git-commit-id-plugin</artifactId>
70-
</plugin>
71-
<plugin>
72-
<groupId>org.apache.maven.plugins</groupId>
73-
<artifactId>maven-dependency-plugin</artifactId>
74-
</plugin>
75-
<plugin>
76-
<groupId>org.apache.maven.plugins</groupId>
77-
<artifactId>maven-resources-plugin</artifactId>
78-
<version>${maven-resources-plugin.version}</version>
79-
</plugin>
80-
<plugin>
81-
<groupId>org.codehaus.mojo</groupId>
82-
<artifactId>exec-maven-plugin</artifactId>
83-
</plugin>
8470
<plugin>
8571
<groupId>org.asciidoctor</groupId>
8672
<artifactId>asciidoctor-maven-plugin</artifactId>
73+
<version>${asciidoctor.maven.plugin.version}</version>
74+
<dependencies>
75+
<dependency>
76+
<groupId>org.jruby</groupId>
77+
<artifactId>jruby</artifactId>
78+
<version>${jruby.version}</version>
79+
</dependency>
80+
<dependency>
81+
<groupId>org.asciidoctor</groupId>
82+
<artifactId>asciidoctorj</artifactId>
83+
<version>${asciidoctorj.version}</version>
84+
</dependency>
85+
</dependencies>
86+
<configuration>
87+
<sourceDirectory>src/main/asciidoc</sourceDirectory>
88+
<attributes>
89+
<endpoint-url>https://github.com/oracle/spring-cloud-oci</endpoint-url>
90+
<sourcedir>${project.build.sourceDirectory}</sourcedir>
91+
<project-version>${project.version}</project-version>
92+
</attributes>
93+
</configuration>
94+
<executions>
95+
<execution>
96+
<id>asciidoc-to-html</id>
97+
<phase>generate-resources</phase>
98+
<goals>
99+
<goal>process-asciidoc</goal>
100+
</goals>
101+
<configuration>
102+
<backend>html5</backend>
103+
<attributes>
104+
<source-highlighter>rouge</source-highlighter>
105+
<imagesdir>./images</imagesdir>
106+
<toc>left</toc>
107+
<icons>font</icons>
108+
<sectanchors>true</sectanchors>
109+
<idprefix/>
110+
<idseparator>-</idseparator>
111+
<docinfo1>true</docinfo1>
112+
</attributes>
113+
</configuration>
114+
</execution>
115+
</executions>
87116
</plugin>
88-
<!-- <plugin>
89-
<groupId>org.apache.maven.plugins</groupId>
90-
<artifactId>maven-antrun-plugin</artifactId>
91-
</plugin> -->
92117
</plugins>
93118
</build>
94119
</profile>
95120
</profiles>
121+
<build>
122+
<plugins>
123+
<plugin>
124+
<groupId>com.diffplug.spotless</groupId>
125+
<artifactId>spotless-maven-plugin</artifactId>
126+
<executions>
127+
<execution>
128+
<phase>validate</phase>
129+
<configuration>
130+
<skip>${disable.checks}</skip>
131+
</configuration>
132+
<goals>
133+
<goal>apply</goal>
134+
<goal>check</goal>
135+
</goals>
136+
</execution>
137+
</executions>
138+
</plugin>
139+
</plugins>
140+
</build>
141+
<dependencyManagement>
142+
<dependencies>
143+
<dependency>
144+
<groupId>com.oracle.cloud.spring</groupId>
145+
<artifactId>spring-cloud-oci-dependencies</artifactId>
146+
<version>${project.version}</version>
147+
<type>pom</type>
148+
<scope>import</scope>
149+
</dependency>
150+
</dependencies>
151+
</dependencyManagement>
96152
</project>

docs/src/main/asciidoc/_configprops.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
|spring.cloud.oci.config.privateKey | |
1414
|spring.cloud.oci.config.passPhrase | |
1515
|spring.cloud.oci.config.region | |
16-
|spring.cloud.oci.region.staticRegion | |
17-
|spring.cloud.oci.compartment.staticCompartment | |
16+
|spring.cloud.oci.region.static | |
17+
|spring.cloud.oci.compartment.static | |
1818
|spring.cloud.oci.storage.enabled | `true` |
1919
|spring.cloud.oci.notification.enabled | `true` |
2020
|spring.cloud.oci.logging.enabled | `true` |

docs/src/main/asciidoc/core.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ spring.cloud.oci.config.privateKey = <PRIVATE_KEY_FILE_PATH>
5151
spring.cloud.oci.config.passPhrase = <PASS_PHRASE>
5252
spring.cloud.oci.config.region = <REGION>
5353
----
54+
Note: spring.cloud.oci.config.passPhrase is optional
5455

5556
==== Instance Principal Configuration
5657

@@ -73,15 +74,15 @@ spring.cloud.oci.config.type = RESOURCE_PRINCIPAL
7374
OCI services are available in different regions. Based on the custom requirements, the user can host the application on different OCI regions. The below configuration allows to set specific region for the entire application.
7475

7576
----
76-
spring.cloud.oci.region.staticRegion = us-ashburn-1
77+
spring.cloud.oci.region.static = us-ashburn-1
7778
----
7879

7980
=== Compartment Configuration
8081

81-
A compartment is a logical container, to organize and control access to the Oracle Cloud Infrastructure (OCI) Resources (Compute, Storage, Network, Load Balancer, etc) created within that compartmen. Below configuration allows you to set default compartment for your application.
82+
A compartment is a logical container, to organize and control access to the Oracle Cloud Infrastructure (OCI) Resources (Compute, Storage, Network, Load Balancer, etc) created within that compartment. Below configuration allows you to set default compartment for your application.
8283

8384
----
84-
spring.cloud.oci.compartment.staticCompartment = <COMPARTMENT_OCID>
85+
spring.cloud.oci.compartment.static = <COMPARTMENT_OCID>
8586
----
8687

8788
=== Spring Initializr

docs/src/main/asciidoc/logging.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[#cloud-logging]
55
== Cloud Logging
66

7-
https://docs.oracle.com/en-us/iaas/Content/Logging/home.htm/[Oracle Cloud Infrastructure (OCI) Logging] service is a highly scalable and fully managed single pane of glass for all the logs in your tenancy. Logging provides access to logs from Oracle Cloud Infrastructure resources. These logs include critical diagnostic information that describes how resources are performing and being accessed. Use Logging to enable, manage, and search Audit, Service and Custom logs. The Spring Cloud module for OCI Logging allows ingesting logs associated with a logId
7+
https://docs.oracle.com/en-us/iaas/Content/Logging/home.htm/[Oracle Cloud Infrastructure (OCI) Logging] service is a highly scalable and fully managed single pane of glass for all the logs in your tenancy. Logging provides access to logs from Oracle Cloud Infrastructure resources. These logs include critical diagnostic information that describes how resources are performing and being accessed. Use Logging to enable, manage, and search Audit, Service and Custom logs. The Spring Cloud module for OCI Logging allows ingesting logs associated with a logId.
88
A Spring Boot starter is provided to auto-configure the Logging component.
99

1010
Maven coordinates, using <<getting-started.adoc#bill-of-materials, Spring Cloud OCI BOM>>:
@@ -30,17 +30,17 @@ This starter is also available from https://start.spring.io/[Spring Initializr]
3030

3131
=== Using Cloud Logging
3232

33-
The starter automatically configures and registers a `LoggingSvc` bean in the Spring application context.
34-
The `LoggingSvc` bean (link[Javadoc]) can be used to ingest logs associated with a logId.
33+
The starter automatically configures and registers a `Logging` bean in the Spring application context.
34+
The `Logging` bean (link[Javadoc]) can be used to ingest logs associated with a logId.
3535

3636
[source,java]
3737
----
3838
@Autowired
39-
private LoggingSvc loggingSvc;
39+
private Logging logging;
4040
4141
public void putLogs() {
4242
43-
PutLogsResponse response = loggingSvc.putLogs("log-text");
43+
PutLogsResponse response = logging.putLogs("log-text");
4444
}
4545
----
4646

pom.xml

Lines changed: 78 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Licensed under the Universal Permissive License v 1.0 as shown at https://oss.or
2121
</license>
2222
</licenses>
2323
<modules>
24+
<module>spring-cloud-oci-dependencies</module>
2425
<module>spring-cloud-oci-core</module>
2526
<module>spring-cloud-oci-autoconfigure</module>
2627
<module>spring-cloud-oci-samples</module>
@@ -31,6 +32,10 @@ Licensed under the Universal Permissive License v 1.0 as shown at https://oss.or
3132
<module>docs</module>
3233
</modules>
3334
<properties>
35+
<!-- spring-cloud-dependencies.version>2022.0.1</spring-cloud-dependencies.version -->
36+
<spring-framework.version>5.3.23</spring-framework.version>
37+
<spring-boot-dependencies.version>2.7.4</spring-boot-dependencies.version>
38+
<oci-sdk.version>3.19.0</oci-sdk.version>
3439
<tomcat.version>8.0.33</tomcat.version>
3540
<javax-mail.version>1.5.5</javax-mail.version>
3641
<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
@@ -51,43 +56,63 @@ Licensed under the Universal Permissive License v 1.0 as shown at https://oss.or
5156
</dependency>
5257
</dependencies>
5358

54-
<!-- <build>
55-
<plugins>
56-
<plugin>
57-
<groupId>org.apache.maven.plugins</groupId>
58-
<artifactId>maven-javadoc-plugin</artifactId>
59-
<version>3.4.1</version>
60-
<executions>
61-
<execution>
62-
<id>attach-javadocs</id>
63-
<goals>
64-
<goal>jar</goal>
65-
</goals>
66-
</execution>
67-
</executions>
68-
</plugin>
69-
</plugins>
70-
</build> -->
71-
7259
<build>
7360
<plugins>
7461
<plugin>
7562
<groupId>org.apache.maven.plugins</groupId>
7663
<artifactId>maven-javadoc-plugin</artifactId>
77-
<version>3.4.1</version>
64+
<version>3.5.0</version>
7865
<configuration>
7966
<skip>false</skip>
80-
<links>
67+
<!--<links>
8168
<link>https://docs.oracle.com/javase/8/docs/api/</link>
8269
<link>https://javaee.github.io/javaee-spec/javadocs/</link>
8370
<link>https://fasterxml.github.io/jackson-core/javadoc/2.8/</link>
8471
<link>https://docs.spring.io/spring/docs/5.3.x/javadoc-api/</link>
85-
</links>
72+
</links> -->
8673
<author>true</author>
8774
<header>${project.name}</header>
8875
<reportOutputDirectory>${project.build.directory}/site/${project.version}/apidocs</reportOutputDirectory>
76+
<excludePackageNames>com.oracle.cloud.spring.sample.*</excludePackageNames>
8977
</configuration>
78+
<executions>
79+
<execution>
80+
<id>attach-javadocs</id>
81+
<goals>
82+
<goal>jar</goal>
83+
</goals>
84+
</execution>
85+
</executions>
9086
</plugin>
87+
<plugin>
88+
<groupId>org.apache.maven.plugins</groupId>
89+
<artifactId>maven-source-plugin</artifactId>
90+
<version>3.3.0</version>
91+
<executions>
92+
<execution>
93+
<id>attach-sources</id>
94+
<goals>
95+
<goal>jar</goal>
96+
</goals>
97+
</execution>
98+
</executions>
99+
</plugin>
100+
<plugin>
101+
<groupId>com.diffplug.spotless</groupId>
102+
<artifactId>spotless-maven-plugin</artifactId>
103+
<executions>
104+
<execution>
105+
<phase>validate</phase>
106+
<configuration>
107+
<skip>${disable.checks}</skip>
108+
</configuration>
109+
<goals>
110+
<goal>apply</goal>
111+
<goal>check</goal>
112+
</goals>
113+
</execution>
114+
</executions>
115+
</plugin>
91116
</plugins>
92117
</build>
93118
<profiles>
@@ -106,5 +131,37 @@ Licensed under the Universal Permissive License v 1.0 as shown at https://oss.or
106131
</build>
107132
</profile>
108133
</profiles>
134+
<dependencyManagement>
135+
<dependencies>
136+
<dependency>
137+
<groupId>com.oracle.oci.sdk</groupId>
138+
<artifactId>oci-java-sdk-bom</artifactId>
139+
<version>${oci-sdk.version}</version>
140+
<type>pom</type>
141+
<scope>import</scope>
142+
</dependency>
143+
<dependency>
144+
<groupId>org.springframework</groupId>
145+
<artifactId>spring-framework-bom</artifactId>
146+
<version>${spring-framework.version}</version>
147+
<type>pom</type>
148+
<scope>import</scope>
149+
</dependency>
150+
<dependency>
151+
<groupId>org.springframework.boot</groupId>
152+
<artifactId>spring-boot-dependencies</artifactId>
153+
<version>${spring-boot-dependencies.version}</version>
154+
<type>pom</type>
155+
<scope>import</scope>
156+
</dependency>
109157

158+
<!-- dependency>
159+
<groupId>org.springframework.cloud</groupId>
160+
<artifactId>spring-cloud-dependencies</artifactId>
161+
<version>${spring-cloud-dependencies.version}</version>
162+
<type>pom</type>
163+
<scope>import</scope>
164+
</dependency -->
165+
</dependencies>
166+
</dependencyManagement>
110167
</project>

0 commit comments

Comments
 (0)