From 38f4e54e0818d91629c176262111279242b96d05 Mon Sep 17 00:00:00 2001 From: James Netherton Date: Tue, 2 May 2023 13:52:15 +0100 Subject: [PATCH] Update documentation references for javax packages to jakarta --- .../pages/reference/extensions/aws2-ddb.adoc | 2 +- .../pages/reference/extensions/aws2-s3.adoc | 2 +- .../pages/reference/extensions/aws2-ses.adoc | 2 +- .../pages/reference/extensions/aws2-sns.adoc | 2 +- .../pages/reference/extensions/aws2-sqs.adoc | 2 +- .../reference/extensions/freemarker.adoc | 6 +++--- .../ROOT/pages/reference/extensions/mock.adoc | 4 ++-- docs/modules/ROOT/pages/user-guide/cdi.adoc | 20 +++++++++---------- .../ROOT/pages/user-guide/command-mode.adoc | 2 +- .../ROOT/pages/user-guide/configuration.adoc | 8 ++++---- .../ROOT/pages/user-guide/testing.adoc | 2 +- .../runtime/src/main/doc/configuration.adoc | 6 +++--- .../mock/runtime/src/main/doc/usage.adoc | 4 ++-- .../doc-templates/extension-doc-page.adoc | 2 +- 14 files changed, 32 insertions(+), 32 deletions(-) diff --git a/docs/modules/ROOT/pages/reference/extensions/aws2-ddb.adoc b/docs/modules/ROOT/pages/reference/extensions/aws2-ddb.adoc index fa8e0940bd25..baa3e8dc169b 100644 --- a/docs/modules/ROOT/pages/reference/extensions/aws2-ddb.adoc +++ b/docs/modules/ROOT/pages/reference/extensions/aws2-ddb.adoc @@ -75,7 +75,7 @@ You can reach that e.g. by adding a dummy bean injecting `DynamoDbClient`: + [source,java] ---- -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import io.quarkus.arc.Unremovable; import software.amazon.awssdk.services.dynamodb.DynamoDbClient; diff --git a/docs/modules/ROOT/pages/reference/extensions/aws2-s3.adoc b/docs/modules/ROOT/pages/reference/extensions/aws2-s3.adoc index 750b27c63ff1..f30de8a383e8 100644 --- a/docs/modules/ROOT/pages/reference/extensions/aws2-s3.adoc +++ b/docs/modules/ROOT/pages/reference/extensions/aws2-s3.adoc @@ -74,7 +74,7 @@ You can reach that e.g. by adding a dummy bean injecting `S3Client`: + [source,java] ---- -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import io.quarkus.arc.Unremovable; import software.amazon.awssdk.services.s3.S3Client; diff --git a/docs/modules/ROOT/pages/reference/extensions/aws2-ses.adoc b/docs/modules/ROOT/pages/reference/extensions/aws2-ses.adoc index 8e9712b8f820..015213eb55ef 100644 --- a/docs/modules/ROOT/pages/reference/extensions/aws2-ses.adoc +++ b/docs/modules/ROOT/pages/reference/extensions/aws2-ses.adoc @@ -74,7 +74,7 @@ You can reach that e.g. by adding a dummy bean injecting `SesClient`: + [source,java] ---- -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import io.quarkus.arc.Unremovable; import software.amazon.awssdk.services.ses.SesClient; diff --git a/docs/modules/ROOT/pages/reference/extensions/aws2-sns.adoc b/docs/modules/ROOT/pages/reference/extensions/aws2-sns.adoc index 116425d2cc26..be0f4535520c 100644 --- a/docs/modules/ROOT/pages/reference/extensions/aws2-sns.adoc +++ b/docs/modules/ROOT/pages/reference/extensions/aws2-sns.adoc @@ -74,7 +74,7 @@ You can reach that e.g. by adding a dummy bean injecting `SnsClient`: + [source,java] ---- -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import io.quarkus.arc.Unremovable; import software.amazon.awssdk.services.sns.SnsClient; diff --git a/docs/modules/ROOT/pages/reference/extensions/aws2-sqs.adoc b/docs/modules/ROOT/pages/reference/extensions/aws2-sqs.adoc index 9cb6e9bb68df..038cf6d10964 100644 --- a/docs/modules/ROOT/pages/reference/extensions/aws2-sqs.adoc +++ b/docs/modules/ROOT/pages/reference/extensions/aws2-sqs.adoc @@ -74,7 +74,7 @@ You can reach that e.g. by adding a dummy bean injecting `SqsClient`: + [source,java] ---- -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import io.quarkus.arc.Unremovable; import software.amazon.awssdk.services.sqs.SqsClient; diff --git a/docs/modules/ROOT/pages/reference/extensions/freemarker.adoc b/docs/modules/ROOT/pages/reference/extensions/freemarker.adoc index 15777dc8667e..6f4c0858d4db 100644 --- a/docs/modules/ROOT/pages/reference/extensions/freemarker.adoc +++ b/docs/modules/ROOT/pages/reference/extensions/freemarker.adoc @@ -68,9 +68,9 @@ you can let CDI to do the required wiring: [source,java] ---- -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.Produces; -import javax.inject.Named; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Produces; +import jakarta.inject.Named; import freemarker.template.Configuration; import io.quarkus.arc.Unremovable; import org.apache.camel.builder.RouteBuilder; diff --git a/docs/modules/ROOT/pages/reference/extensions/mock.adoc b/docs/modules/ROOT/pages/reference/extensions/mock.adoc index 2cbd7574a3f8..b430d9b65c35 100644 --- a/docs/modules/ROOT/pages/reference/extensions/mock.adoc +++ b/docs/modules/ROOT/pages/reference/extensions/mock.adoc @@ -54,7 +54,7 @@ You can inject camelContext into test using `@Inject` annotation. Camel context See the following example: ---- -import javax.inject.Inject; +import jakarta.inject.Inject; import org.apache.camel.CamelContext; import org.apache.camel.ProducerTemplate; @@ -86,7 +86,7 @@ public class MockJvmTest { ---- Route used for the example test: ---- -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import org.apache.camel.builder.RouteBuilder; diff --git a/docs/modules/ROOT/pages/user-guide/cdi.adoc b/docs/modules/ROOT/pages/user-guide/cdi.adoc index 3dab2d247b7c..6170b5042869 100644 --- a/docs/modules/ROOT/pages/user-guide/cdi.adoc +++ b/docs/modules/ROOT/pages/user-guide/cdi.adoc @@ -8,8 +8,8 @@ your Camel `RouteBuilder`. Here is the `RouteBuilder` from our `timer-log-cdi` x [source,java] ---- -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; import org.apache.camel.builder.RouteBuilder; import org.eclipse.microprofile.config.inject.ConfigProperty; @@ -47,8 +47,8 @@ To access `CamelContext` just inject it into your bean: [source,java] ---- -import javax.inject.Inject; -import javax.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; import java.util.stream.Collectors; import java.util.List; import org.apache.camel.CamelContext; @@ -75,7 +75,7 @@ The following use cases are supported by `org.apache.camel.quarkus:camel-quarkus [source,java] ---- -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import org.apache.camel.EndpointInject; import org.apache.camel.FluentProducerTemplate; import org.apache.camel.Produce; @@ -114,7 +114,7 @@ The following use case is supported by `org.apache.camel.quarkus:camel-quarkus-b [source,java] ---- -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import org.apache.camel.Produce; @ApplicationScoped @@ -147,8 +147,8 @@ is important for the native mode. [source,java] ---- -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Named; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Named; import io.quarkus.runtime.annotations.RegisterForReflection; @ApplicationScoped @@ -182,7 +182,7 @@ As an alternative to `@Named`, you may also use `io.smallrye.common.annotation.I [source,java] ---- -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import io.quarkus.runtime.annotations.RegisterForReflection; import io.smallrye.common.annotation.Identifier; @@ -241,6 +241,6 @@ from("activemq:cheese").bean("foo1234", "onCheese") ---- for you. -Note that Camel Quarkus will implicitly add `@javax.inject.Singleton` and `javax.inject.Named("foo1234")` to the bean class, where `1234` is a hash code obtained from the fully qualified class name. +Note that Camel Quarkus will implicitly add `@jakarta.inject.Singleton` and `jakarta.inject.Named("foo1234")` to the bean class, where `1234` is a hash code obtained from the fully qualified class name. If your bean has some CDI scope (such as `@ApplicationScoped`) or `@Named("someName")` set already, those will be honored in the auto-created route. diff --git a/docs/modules/ROOT/pages/user-guide/command-mode.adoc b/docs/modules/ROOT/pages/user-guide/command-mode.adoc index aebf79e861fb..c3f6ebf35701 100644 --- a/docs/modules/ROOT/pages/user-guide/command-mode.adoc +++ b/docs/modules/ROOT/pages/user-guide/command-mode.adoc @@ -113,7 +113,7 @@ We can use https://quarkus.io/guides/config[Quarkus MicroProfile Config] for tha [source,java] ---- -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import org.apache.camel.builder.RouteBuilder; import org.eclipse.microprofile.config.inject.ConfigProperty; diff --git a/docs/modules/ROOT/pages/user-guide/configuration.adoc b/docs/modules/ROOT/pages/user-guide/configuration.adoc index e5c2b9fbefca..bc7998f78b9e 100644 --- a/docs/modules/ROOT/pages/user-guide/configuration.adoc +++ b/docs/modules/ROOT/pages/user-guide/configuration.adoc @@ -46,8 +46,8 @@ The recommended method is to observe the `ComponentAddEvent` and configure the c [source,java] ---- -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.event.Observes; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.event.Observes; import org.apache.camel.quarkus.core.events.ComponentAddEvent; import org.apache.camel.component.log.LogComponent; import org.apache.camel.support.processor.DefaultExchangeFormatter; @@ -86,8 +86,8 @@ These actions are not performed when you produce your own component instance, th [source,java] ---- -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Named; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Named; import org.apache.camel.component.log.LogComponent; import org.apache.camel.support.processor.DefaultExchangeFormatter; diff --git a/docs/modules/ROOT/pages/user-guide/testing.adoc b/docs/modules/ROOT/pages/user-guide/testing.adoc index ccc24f2d298c..947f14ed5a85 100644 --- a/docs/modules/ROOT/pages/user-guide/testing.adoc +++ b/docs/modules/ROOT/pages/user-guide/testing.adoc @@ -60,7 +60,7 @@ An implementation of a native test may help to capture more details https://gith JVM mode tests annotated with `@QuarkusTest` are executed in the same JVM as the application under test. Thanks to that, `@Inject`-ing beans from the application into the test code is possible. -You can also define new beans or even override the beans from the application using `@javax.enterprise.inject.Alternative` and `@javax.annotation.Priority`. +You can also define new beans or even override the beans from the application using `@jakarta.enterprise.inject.Alternative` and `@jakarta.annotation.Priority`. However all these tricks won't work in native mode tests annotated with `@QuarkusIntegrationTest` because those are executed in a JVM hosted in a process separate from the running native application. diff --git a/extensions/freemarker/runtime/src/main/doc/configuration.adoc b/extensions/freemarker/runtime/src/main/doc/configuration.adoc index 6e9e155908af..eb2c9c102477 100644 --- a/extensions/freemarker/runtime/src/main/doc/configuration.adoc +++ b/extensions/freemarker/runtime/src/main/doc/configuration.adoc @@ -12,9 +12,9 @@ you can let CDI to do the required wiring: [source,java] ---- -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.Produces; -import javax.inject.Named; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Produces; +import jakarta.inject.Named; import freemarker.template.Configuration; import io.quarkus.arc.Unremovable; import org.apache.camel.builder.RouteBuilder; diff --git a/extensions/mock/runtime/src/main/doc/usage.adoc b/extensions/mock/runtime/src/main/doc/usage.adoc index bdd3dd077b1a..db9f731994c3 100644 --- a/extensions/mock/runtime/src/main/doc/usage.adoc +++ b/extensions/mock/runtime/src/main/doc/usage.adoc @@ -5,7 +5,7 @@ You can inject camelContext into test using `@Inject` annotation. Camel context See the following example: ---- -import javax.inject.Inject; +import jakarta.inject.Inject; import org.apache.camel.CamelContext; import org.apache.camel.ProducerTemplate; @@ -37,7 +37,7 @@ public class MockJvmTest { ---- Route used for the example test: ---- -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import org.apache.camel.builder.RouteBuilder; diff --git a/tooling/maven-plugin/src/main/resources/doc-templates/extension-doc-page.adoc b/tooling/maven-plugin/src/main/resources/doc-templates/extension-doc-page.adoc index d2eb6638135b..c5bec2b4579a 100644 --- a/tooling/maven-plugin/src/main/resources/doc-templates/extension-doc-page.adoc +++ b/tooling/maven-plugin/src/main/resources/doc-templates/extension-doc-page.adoc @@ -127,7 +127,7 @@ You can reach that e.g. by adding a dummy bean injecting `[=quarkusAwsClient.cli + [source,java] ---- -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import io.quarkus.arc.Unremovable; import [=quarkusAwsClient.clientClassFqName];