diff --git a/settings.gradle b/settings.gradle index d6b0898665e..63c1415cf24 100644 --- a/settings.gradle +++ b/settings.gradle @@ -85,7 +85,6 @@ include "spring-boot-project:spring-boot-data-rest" include "spring-boot-project:spring-boot-dependencies" include "spring-boot-project:spring-boot-devtools" include "spring-boot-project:spring-boot-docker-compose" -include "spring-boot-project:spring-boot-docker-compose-all" include "spring-boot-project:spring-boot-docs" include "spring-boot-project:spring-boot-elasticsearch" include "spring-boot-project:spring-boot-flyway" diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index ef39625cf39..e64aabe6ca7 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -2013,7 +2013,6 @@ bom { "spring-boot-data-rest", "spring-boot-devtools", "spring-boot-docker-compose", - "spring-boot-docker-compose-all", "spring-boot-elasticsearch", "spring-boot-flyway", "spring-boot-freemarker", diff --git a/spring-boot-project/spring-boot-docker-compose-all/build.gradle b/spring-boot-project/spring-boot-docker-compose-all/build.gradle deleted file mode 100644 index b148001108f..00000000000 --- a/spring-boot-project/spring-boot-docker-compose-all/build.gradle +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright 2012-present the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -plugins { - id "java-library" - id "org.springframework.boot.deployed" - id "org.springframework.boot.docker-test" - id "org.springframework.boot.optional-dependencies" -} - -description = "Spring Boot Docker Compose All" - -dependencies { - api(project(":spring-boot-project:spring-boot")) - api(project(":spring-boot-project:spring-boot-docker-compose")) - - dockerTestImplementation(testFixtures(project(":spring-boot-project:spring-boot-docker-compose"))) - dockerTestImplementation(project(":spring-boot-project:spring-boot-jdbc")) - dockerTestImplementation(project(":spring-boot-project:spring-boot-flyway")) - dockerTestImplementation(project(":spring-boot-project:spring-boot-liquibase")) - dockerTestImplementation(project(":spring-boot-project:spring-boot-opentelemetry")) - dockerTestImplementation(project(":spring-boot-project:spring-boot-pulsar")) - dockerTestImplementation(project(":spring-boot-project:spring-boot-r2dbc")) - dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker")) - dockerTestImplementation("com.redis:testcontainers-redis") - dockerTestImplementation("org.assertj:assertj-core") - dockerTestImplementation("org.awaitility:awaitility") - dockerTestImplementation("org.junit.jupiter:junit-jupiter") - dockerTestImplementation("org.testcontainers:testcontainers") - - dockerTestRuntimeOnly("com.clickhouse:clickhouse-jdbc") - dockerTestRuntimeOnly("com.clickhouse:clickhouse-r2dbc") - dockerTestRuntimeOnly("com.microsoft.sqlserver:mssql-jdbc") - dockerTestRuntimeOnly("com.oracle.database.r2dbc:oracle-r2dbc") - dockerTestRuntimeOnly("io.opentelemetry:opentelemetry-exporter-otlp") - dockerTestRuntimeOnly("io.r2dbc:r2dbc-mssql") - dockerTestRuntimeOnly("org.postgresql:postgresql") - dockerTestRuntimeOnly("org.postgresql:r2dbc-postgresql") - - implementation("com.fasterxml.jackson.core:jackson-databind") - implementation("com.fasterxml.jackson.module:jackson-module-parameter-names") - - optional(project(":spring-boot-project:spring-boot-activemq")) - optional(project(":spring-boot-project:spring-boot-amqp")) - optional(project(":spring-boot-project:spring-boot-artemis")) - optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure-all")) - optional(project(":spring-boot-project:spring-boot-cassandra")) - optional(project(":spring-boot-project:spring-boot-data-redis")) - optional(project(":spring-boot-project:spring-boot-elasticsearch")) - optional(project(":spring-boot-project:spring-boot-flyway")) - optional(project(":spring-boot-project:spring-boot-hazelcast")) - optional(project(":spring-boot-project:spring-boot-jdbc")) - optional(project(":spring-boot-project:spring-boot-ldap")) - optional(project(":spring-boot-project:spring-boot-liquibase")) - optional(project(":spring-boot-project:spring-boot-metrics")) - optional(project(":spring-boot-project:spring-boot-mongodb")) - optional(project(":spring-boot-project:spring-boot-neo4j")) - optional(project(":spring-boot-project:spring-boot-opentelemetry")) - optional(project(":spring-boot-project:spring-boot-pulsar")) - optional(project(":spring-boot-project:spring-boot-r2dbc")) - optional(project(":spring-boot-project:spring-boot-tracing")) - optional(project(":spring-boot-project:spring-boot-zipkin")) - optional("com.hazelcast:hazelcast") - optional("org.mongodb:mongodb-driver-core") - optional("org.neo4j.driver:neo4j-java-driver") - optional("org.springframework.data:spring-data-r2dbc") - - testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) - testImplementation(project(":spring-boot-project:spring-boot-test")) - testImplementation("ch.qos.logback:logback-classic") -} - -tasks.named("javadoc") { - enabled = false -} diff --git a/spring-boot-project/spring-boot-docker-compose-all/src/main/resources/META-INF/spring.factories b/spring-boot-project/spring-boot-docker-compose-all/src/main/resources/META-INF/spring.factories deleted file mode 100644 index c67c253218f..00000000000 --- a/spring-boot-project/spring-boot-docker-compose-all/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,5 +0,0 @@ -# Connection Details Factories -org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory=\ -org.springframework.boot.docker.compose.service.connection.otlp.OpenTelemetryLoggingDockerComposeConnectionDetailsFactory,\ -org.springframework.boot.docker.compose.service.connection.otlp.OpenTelemetryMetricsDockerComposeConnectionDetailsFactory,\ -org.springframework.boot.docker.compose.service.connection.otlp.OpenTelemetryTracingDockerComposeConnectionDetailsFactory diff --git a/spring-boot-project/spring-boot-docs/build.gradle b/spring-boot-project/spring-boot-docs/build.gradle index 17bb410e29f..3c10af6c28a 100644 --- a/spring-boot-project/spring-boot-docs/build.gradle +++ b/spring-boot-project/spring-boot-docs/build.gradle @@ -257,7 +257,6 @@ dependencies { implementation(project(path: ":spring-boot-project:spring-boot-data-neo4j")) implementation(project(path: ":spring-boot-project:spring-boot-devtools")) implementation(project(path: ":spring-boot-project:spring-boot-docker-compose")) - implementation(project(path: ":spring-boot-project:spring-boot-docker-compose-all")) implementation(project(path: ":spring-boot-project:spring-boot-http-converter")) implementation(project(path: ":spring-boot-project:spring-boot-http-codec")) implementation(project(path: ":spring-boot-project:spring-boot-integration")) diff --git a/spring-boot-project/spring-boot-metrics/build.gradle b/spring-boot-project/spring-boot-metrics/build.gradle index 71328f008a4..1a704459d12 100644 --- a/spring-boot-project/spring-boot-metrics/build.gradle +++ b/spring-boot-project/spring-boot-metrics/build.gradle @@ -34,6 +34,7 @@ dependencies { optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure")) optional(project(":spring-boot-project:spring-boot-autoconfigure")) + optional(project(":spring-boot-project:spring-boot-docker-compose")) optional(project(":spring-boot-project:spring-boot-opentelemetry")) optional(project(":spring-boot-project:spring-boot-testcontainers")) optional("ch.qos.logback:logback-classic") @@ -65,6 +66,7 @@ dependencies { optional("org.testcontainers:grafana") dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker")) + dockerTestImplementation(testFixtures(project(":spring-boot-project:spring-boot-docker-compose"))) dockerTestImplementation("io.rest-assured:rest-assured") dockerTestImplementation("org.testcontainers:junit-jupiter") diff --git a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/GrafanaOpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests.java b/spring-boot-project/spring-boot-metrics/src/dockerTest/java/org/springframework/boot/metrics/docker/compose/otlp/GrafanaOpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests.java similarity index 95% rename from spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/GrafanaOpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests.java rename to spring-boot-project/spring-boot-metrics/src/dockerTest/java/org/springframework/boot/metrics/docker/compose/otlp/GrafanaOpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests.java index c3705f91848..d1bc5d89434 100644 --- a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/GrafanaOpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests.java +++ b/spring-boot-project/spring-boot-metrics/src/dockerTest/java/org/springframework/boot/metrics/docker/compose/otlp/GrafanaOpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docker.compose.service.connection.otlp; +package org.springframework.boot.metrics.docker.compose.otlp; import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest; import org.springframework.boot.metrics.autoconfigure.export.otlp.OtlpMetricsConnectionDetails; diff --git a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests.java b/spring-boot-project/spring-boot-metrics/src/dockerTest/java/org/springframework/boot/metrics/docker/compose/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests.java similarity index 95% rename from spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests.java rename to spring-boot-project/spring-boot-metrics/src/dockerTest/java/org/springframework/boot/metrics/docker/compose/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests.java index 6c94a7d1667..341033b68cf 100644 --- a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests.java +++ b/spring-boot-project/spring-boot-metrics/src/dockerTest/java/org/springframework/boot/metrics/docker/compose/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docker.compose.service.connection.otlp; +package org.springframework.boot.metrics.docker.compose.otlp; import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest; import org.springframework.boot.metrics.autoconfigure.export.otlp.OtlpMetricsConnectionDetails; diff --git a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/resources/org/springframework/boot/docker/compose/service/connection/otlp/otlp-compose.yaml b/spring-boot-project/spring-boot-metrics/src/dockerTest/resources/org/springframework/boot/metrics/docker/compose/otlp/otlp-compose.yaml similarity index 100% rename from spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/resources/org/springframework/boot/docker/compose/service/connection/otlp/otlp-compose.yaml rename to spring-boot-project/spring-boot-metrics/src/dockerTest/resources/org/springframework/boot/metrics/docker/compose/otlp/otlp-compose.yaml diff --git a/spring-boot-project/spring-boot-docker-compose-all/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactory.java b/spring-boot-project/spring-boot-metrics/src/main/java/org/springframework/boot/metrics/docker/compose/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactory.java similarity index 97% rename from spring-boot-project/spring-boot-docker-compose-all/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactory.java rename to spring-boot-project/spring-boot-metrics/src/main/java/org/springframework/boot/metrics/docker/compose/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactory.java index 85394e707c9..3b7160e3595 100644 --- a/spring-boot-project/spring-boot-docker-compose-all/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactory.java +++ b/spring-boot-project/spring-boot-metrics/src/main/java/org/springframework/boot/metrics/docker/compose/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactory.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docker.compose.service.connection.otlp; +package org.springframework.boot.metrics.docker.compose.otlp; import org.springframework.boot.docker.compose.core.RunningService; import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionDetailsFactory; diff --git a/spring-boot-project/spring-boot-docker-compose-all/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/package-info.java b/spring-boot-project/spring-boot-metrics/src/main/java/org/springframework/boot/metrics/docker/compose/otlp/package-info.java similarity index 82% rename from spring-boot-project/spring-boot-docker-compose-all/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/package-info.java rename to spring-boot-project/spring-boot-metrics/src/main/java/org/springframework/boot/metrics/docker/compose/otlp/package-info.java index 65e5f41f7da..8d01bba6aac 100644 --- a/spring-boot-project/spring-boot-docker-compose-all/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/package-info.java +++ b/spring-boot-project/spring-boot-metrics/src/main/java/org/springframework/boot/metrics/docker/compose/otlp/package-info.java @@ -15,6 +15,6 @@ */ /** - * Support for Docker Compose OpenTelemetry service connections. + * Support for Docker Compose OpenTelemetry metrics service connections. */ -package org.springframework.boot.docker.compose.service.connection.otlp; +package org.springframework.boot.metrics.docker.compose.otlp; diff --git a/spring-boot-project/spring-boot-metrics/src/main/resources/META-INF/spring.factories b/spring-boot-project/spring-boot-metrics/src/main/resources/META-INF/spring.factories index 8f7d162eaa9..fc13ca12bd1 100644 --- a/spring-boot-project/spring-boot-metrics/src/main/resources/META-INF/spring.factories +++ b/spring-boot-project/spring-boot-metrics/src/main/resources/META-INF/spring.factories @@ -1,5 +1,6 @@ # Connection Details Factories org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory=\ +org.springframework.boot.metrics.docker.compose.otlp.OpenTelemetryMetricsDockerComposeConnectionDetailsFactory,\ org.springframework.boot.metrics.testcontainers.otlp.GrafanaOpenTelemetryMetricsContainerConnectionDetailsFactory,\ org.springframework.boot.metrics.testcontainers.otlp.OpenTelemetryMetricsContainerConnectionDetailsFactory diff --git a/spring-boot-project/spring-boot-opentelemetry/build.gradle b/spring-boot-project/spring-boot-opentelemetry/build.gradle index 5d2d54c930f..dad6aed4bda 100644 --- a/spring-boot-project/spring-boot-opentelemetry/build.gradle +++ b/spring-boot-project/spring-boot-opentelemetry/build.gradle @@ -33,11 +33,13 @@ dependencies { optional(project(":spring-boot-project:spring-boot-autoconfigure")) optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure")) + optional(project(":spring-boot-project:spring-boot-docker-compose")) optional(project(":spring-boot-project:spring-boot-testcontainers")) optional("io.opentelemetry:opentelemetry-exporter-otlp") optional("org.testcontainers:grafana") dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker")) + dockerTestImplementation(testFixtures(project(":spring-boot-project:spring-boot-docker-compose"))) dockerTestImplementation("org.testcontainers:junit-jupiter") testImplementation(project(":spring-boot-project:spring-boot-test")) diff --git a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/GrafanaOpenTelemetryLoggingDockerComposeConnectionDetailsFactoryIntegrationTests.java b/spring-boot-project/spring-boot-opentelemetry/src/dockerTest/java/org/springframework/boot/opentelemetry/docker/compose/GrafanaOpenTelemetryLoggingDockerComposeConnectionDetailsFactoryIntegrationTests.java similarity index 95% rename from spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/GrafanaOpenTelemetryLoggingDockerComposeConnectionDetailsFactoryIntegrationTests.java rename to spring-boot-project/spring-boot-opentelemetry/src/dockerTest/java/org/springframework/boot/opentelemetry/docker/compose/GrafanaOpenTelemetryLoggingDockerComposeConnectionDetailsFactoryIntegrationTests.java index 1140af8c717..55723d9da81 100644 --- a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/GrafanaOpenTelemetryLoggingDockerComposeConnectionDetailsFactoryIntegrationTests.java +++ b/spring-boot-project/spring-boot-opentelemetry/src/dockerTest/java/org/springframework/boot/opentelemetry/docker/compose/GrafanaOpenTelemetryLoggingDockerComposeConnectionDetailsFactoryIntegrationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docker.compose.service.connection.otlp; +package org.springframework.boot.opentelemetry.docker.compose; import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest; import org.springframework.boot.opentelemetry.actuate.autoconfigure.logging.OpenTelemetryLoggingConnectionDetails; diff --git a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryLoggingDockerComposeConnectionDetailsFactoryIntegrationTests.java b/spring-boot-project/spring-boot-opentelemetry/src/dockerTest/java/org/springframework/boot/opentelemetry/docker/compose/OpenTelemetryLoggingDockerComposeConnectionDetailsFactoryIntegrationTests.java similarity index 95% rename from spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryLoggingDockerComposeConnectionDetailsFactoryIntegrationTests.java rename to spring-boot-project/spring-boot-opentelemetry/src/dockerTest/java/org/springframework/boot/opentelemetry/docker/compose/OpenTelemetryLoggingDockerComposeConnectionDetailsFactoryIntegrationTests.java index 471fd2bc287..284d743ec2b 100644 --- a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryLoggingDockerComposeConnectionDetailsFactoryIntegrationTests.java +++ b/spring-boot-project/spring-boot-opentelemetry/src/dockerTest/java/org/springframework/boot/opentelemetry/docker/compose/OpenTelemetryLoggingDockerComposeConnectionDetailsFactoryIntegrationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docker.compose.service.connection.otlp; +package org.springframework.boot.opentelemetry.docker.compose; import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest; import org.springframework.boot.opentelemetry.actuate.autoconfigure.logging.OpenTelemetryLoggingConnectionDetails; diff --git a/spring-boot-project/spring-boot-opentelemetry/src/dockerTest/resources/org/springframework/boot/opentelemetry/docker/compose/otlp-compose.yaml b/spring-boot-project/spring-boot-opentelemetry/src/dockerTest/resources/org/springframework/boot/opentelemetry/docker/compose/otlp-compose.yaml new file mode 100644 index 00000000000..86e05475417 --- /dev/null +++ b/spring-boot-project/spring-boot-opentelemetry/src/dockerTest/resources/org/springframework/boot/opentelemetry/docker/compose/otlp-compose.yaml @@ -0,0 +1,6 @@ +services: + otlp: + image: '{imageName}' + ports: + - '4317' + - '4318' diff --git a/spring-boot-project/spring-boot-docker-compose-all/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryLoggingDockerComposeConnectionDetailsFactory.java b/spring-boot-project/spring-boot-opentelemetry/src/main/java/org/springframework/boot/opentelemetry/docker/compose/OpenTelemetryLoggingDockerComposeConnectionDetailsFactory.java similarity index 97% rename from spring-boot-project/spring-boot-docker-compose-all/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryLoggingDockerComposeConnectionDetailsFactory.java rename to spring-boot-project/spring-boot-opentelemetry/src/main/java/org/springframework/boot/opentelemetry/docker/compose/OpenTelemetryLoggingDockerComposeConnectionDetailsFactory.java index 7e6eaef27b4..5bc31542524 100644 --- a/spring-boot-project/spring-boot-docker-compose-all/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryLoggingDockerComposeConnectionDetailsFactory.java +++ b/spring-boot-project/spring-boot-opentelemetry/src/main/java/org/springframework/boot/opentelemetry/docker/compose/OpenTelemetryLoggingDockerComposeConnectionDetailsFactory.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docker.compose.service.connection.otlp; +package org.springframework.boot.opentelemetry.docker.compose; import org.springframework.boot.docker.compose.core.RunningService; import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionDetailsFactory; diff --git a/spring-boot-project/spring-boot-opentelemetry/src/main/java/org/springframework/boot/opentelemetry/docker/compose/package-info.java b/spring-boot-project/spring-boot-opentelemetry/src/main/java/org/springframework/boot/opentelemetry/docker/compose/package-info.java new file mode 100644 index 00000000000..1cff1f0adf4 --- /dev/null +++ b/spring-boot-project/spring-boot-opentelemetry/src/main/java/org/springframework/boot/opentelemetry/docker/compose/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2012-present the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Support for Docker Compose OpenTelemetry logging service connections. + */ +package org.springframework.boot.opentelemetry.docker.compose; diff --git a/spring-boot-project/spring-boot-opentelemetry/src/main/resources/META-INF/spring.factories b/spring-boot-project/spring-boot-opentelemetry/src/main/resources/META-INF/spring.factories index bc0547c4cfb..c0e36edc185 100644 --- a/spring-boot-project/spring-boot-opentelemetry/src/main/resources/META-INF/spring.factories +++ b/spring-boot-project/spring-boot-opentelemetry/src/main/resources/META-INF/spring.factories @@ -1,4 +1,5 @@ # Connection Details Factories org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory=\ +org.springframework.boot.opentelemetry.docker.compose.OpenTelemetryLoggingDockerComposeConnectionDetailsFactory,\ org.springframework.boot.opentelemetry.testcontainers.GrafanaOpenTelemetryLoggingContainerConnectionDetailsFactory,\ -org.springframework.boot.opentelemetry.testcontainers.OpenTelemetryLoggingContainerConnectionDetailsFactory +org.springframework.boot.opentelemetry.testcontainers.OpenTelemetryLoggingContainerConnectionDetailsFactory \ No newline at end of file diff --git a/spring-boot-project/spring-boot-test-autoconfigure/build.gradle b/spring-boot-project/spring-boot-test-autoconfigure/build.gradle index a246e3540f5..e887a4779ad 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/build.gradle +++ b/spring-boot-project/spring-boot-test-autoconfigure/build.gradle @@ -38,7 +38,6 @@ dependencies { dockerTestImplementation(project(":spring-boot-project:spring-boot-data-mongodb")) dockerTestImplementation(project(":spring-boot-project:spring-boot-docker-compose")) - dockerTestImplementation(project(":spring-boot-project:spring-boot-docker-compose-all")) dockerTestImplementation(project(":spring-boot-project:spring-boot-testcontainers")) dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker")) dockerTestImplementation(project(":spring-boot-project:spring-boot-tx")) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/build.gradle b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/build.gradle index 5970b6d256f..331ec66ed76 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/build.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/build.gradle @@ -94,7 +94,6 @@ dependencies { mavenRepository(project(path: ":spring-boot-project:spring-boot-test", configuration: "mavenRepository")) mavenRepository(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "mavenRepository")) mavenRepository(project(path: ":spring-boot-project:spring-boot-docker-compose", configuration: "mavenRepository")) - mavenRepository(project(path: ":spring-boot-project:spring-boot-docker-compose-all", configuration: "mavenRepository")) mavenRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-parent", configuration: "mavenRepository")) versionProperties(project(path: ":spring-boot-project:spring-boot-dependencies", configuration: "resolvedBom")) diff --git a/spring-boot-project/spring-boot-tracing/build.gradle b/spring-boot-project/spring-boot-tracing/build.gradle index 9666e3d094b..8b07d43a92c 100644 --- a/spring-boot-project/spring-boot-tracing/build.gradle +++ b/spring-boot-project/spring-boot-tracing/build.gradle @@ -35,6 +35,7 @@ dependencies { optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure")) optional(project(":spring-boot-project:spring-boot-autoconfigure")) + optional(project(":spring-boot-project:spring-boot-docker-compose")) optional(project(":spring-boot-project:spring-boot-metrics")) optional(project(":spring-boot-project:spring-boot-testcontainers")) optional("io.micrometer:micrometer-core") @@ -49,6 +50,7 @@ dependencies { optional("org.testcontainers:grafana") dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker")) + dockerTestImplementation(testFixtures(project(":spring-boot-project:spring-boot-docker-compose"))) dockerTestImplementation("org.testcontainers:junit-jupiter") testImplementation(project(":spring-boot-project:spring-boot-opentelemetry")) diff --git a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/GrafanaOpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests.java b/spring-boot-project/spring-boot-tracing/src/dockerTest/java/org/springframework/boot/tracing/docker/compose/otlp/GrafanaOpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests.java similarity index 95% rename from spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/GrafanaOpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests.java rename to spring-boot-project/spring-boot-tracing/src/dockerTest/java/org/springframework/boot/tracing/docker/compose/otlp/GrafanaOpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests.java index 7ea6e9c057e..8f0650b3d34 100644 --- a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/GrafanaOpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests.java +++ b/spring-boot-project/spring-boot-tracing/src/dockerTest/java/org/springframework/boot/tracing/docker/compose/otlp/GrafanaOpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docker.compose.service.connection.otlp; +package org.springframework.boot.tracing.docker.compose.otlp; import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest; import org.springframework.boot.testsupport.container.TestImage; diff --git a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests.java b/spring-boot-project/spring-boot-tracing/src/dockerTest/java/org/springframework/boot/tracing/docker/compose/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests.java similarity index 95% rename from spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests.java rename to spring-boot-project/spring-boot-tracing/src/dockerTest/java/org/springframework/boot/tracing/docker/compose/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests.java index d2ff3043407..d12c5a68949 100644 --- a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests.java +++ b/spring-boot-project/spring-boot-tracing/src/dockerTest/java/org/springframework/boot/tracing/docker/compose/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docker.compose.service.connection.otlp; +package org.springframework.boot.tracing.docker.compose.otlp; import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest; import org.springframework.boot.testsupport.container.TestImage; diff --git a/spring-boot-project/spring-boot-tracing/src/dockerTest/resources/org/springframework/boot/tracing/docker/compose/otlp/otlp-compose.yaml b/spring-boot-project/spring-boot-tracing/src/dockerTest/resources/org/springframework/boot/tracing/docker/compose/otlp/otlp-compose.yaml new file mode 100644 index 00000000000..86e05475417 --- /dev/null +++ b/spring-boot-project/spring-boot-tracing/src/dockerTest/resources/org/springframework/boot/tracing/docker/compose/otlp/otlp-compose.yaml @@ -0,0 +1,6 @@ +services: + otlp: + image: '{imageName}' + ports: + - '4317' + - '4318' diff --git a/spring-boot-project/spring-boot-docker-compose-all/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactory.java b/spring-boot-project/spring-boot-tracing/src/main/java/org/springframework/boot/tracing/docker/compose/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactory.java similarity index 97% rename from spring-boot-project/spring-boot-docker-compose-all/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactory.java rename to spring-boot-project/spring-boot-tracing/src/main/java/org/springframework/boot/tracing/docker/compose/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactory.java index 97fb8ec7185..0f86e09987e 100644 --- a/spring-boot-project/spring-boot-docker-compose-all/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactory.java +++ b/spring-boot-project/spring-boot-tracing/src/main/java/org/springframework/boot/tracing/docker/compose/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactory.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docker.compose.service.connection.otlp; +package org.springframework.boot.tracing.docker.compose.otlp; import org.springframework.boot.docker.compose.core.RunningService; import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionDetailsFactory; diff --git a/spring-boot-project/spring-boot-tracing/src/main/java/org/springframework/boot/tracing/docker/compose/otlp/package-info.java b/spring-boot-project/spring-boot-tracing/src/main/java/org/springframework/boot/tracing/docker/compose/otlp/package-info.java new file mode 100644 index 00000000000..acea16df215 --- /dev/null +++ b/spring-boot-project/spring-boot-tracing/src/main/java/org/springframework/boot/tracing/docker/compose/otlp/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2012-present the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Support for Docker Compose OpenTelemetry tracing service connections. + */ +package org.springframework.boot.tracing.docker.compose.otlp; diff --git a/spring-boot-project/spring-boot-tracing/src/main/resources/META-INF/spring.factories b/spring-boot-project/spring-boot-tracing/src/main/resources/META-INF/spring.factories index ba1aa27ae0e..bf812ffd840 100644 --- a/spring-boot-project/spring-boot-tracing/src/main/resources/META-INF/spring.factories +++ b/spring-boot-project/spring-boot-tracing/src/main/resources/META-INF/spring.factories @@ -1,5 +1,6 @@ # Connection Details Factories org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory=\ +org.springframework.boot.tracing.docker.compose.otlp.OpenTelemetryTracingDockerComposeConnectionDetailsFactory,\ org.springframework.boot.tracing.testcontainers.otlp.GrafanaOpenTelemetryTracingContainerConnectionDetailsFactory,\ org.springframework.boot.tracing.testcontainers.otlp.OpenTelemetryTracingContainerConnectionDetailsFactory @@ -11,3 +12,4 @@ org.springframework.boot.tracing.autoconfigure.OpenTelemetryEventPublisherBeansA org.springframework.boot.env.EnvironmentPostProcessor=\ org.springframework.boot.tracing.autoconfigure.LogCorrelationEnvironmentPostProcessor +