Skip to content

Commit

Permalink
AWS2 EventBridge native support
Browse files Browse the repository at this point in the history
  • Loading branch information
oscerd committed Feb 2, 2021
1 parent b97fc8d commit adbe6ba
Show file tree
Hide file tree
Showing 17 changed files with 108 additions and 224 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
= AWS 2 Eventbridge
:cq-artifact-id: camel-quarkus-aws2-eventbridge
:cq-native-supported: false
:cq-status: Preview
:cq-native-supported: true
:cq-status: Stable
:cq-description: Manage AWS Eventbridge cluster instances using AWS SDK version 2.x.
:cq-deprecated: false
:cq-jvm-since: 1.4.0
:cq-native-since: n/a
:cq-native-since: 1.7.0

[.badges]
[.badge-key]##JVM since##[.badge-supported]##1.4.0## [.badge-key]##Native##[.badge-unsupported]##unsupported##
[.badge-key]##JVM since##[.badge-supported]##1.4.0## [.badge-key]##Native since##[.badge-supported]##1.7.0##

Manage AWS Eventbridge cluster instances using AWS SDK version 2.x.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
:cq-artifact-id: camel-quarkus-aws2-eventbridge
:cq-artifact-id-base: aws2-eventbridge
:cq-native-supported: false
:cq-status: Preview
:cq-native-supported: true
:cq-status: Stable
:cq-deprecated: false
:cq-jvm-since: 1.4.0
:cq-native-since: n/a
:cq-native-since: 1.7.0
:cq-camel-part-name: aws2-eventbridge
:cq-camel-part-title: AWS 2 Eventbridge
:cq-camel-part-description: Manage AWS Eventbridge cluster instances using AWS SDK version 2.x.
Expand Down

This file was deleted.

82 changes: 0 additions & 82 deletions extensions-jvm/aws2-eventbridge/integration-test/pom.xml

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion extensions-jvm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
<module>atmos</module>
<module>atomix</module>
<module>aws-xray</module>
<module>aws2-eventbridge</module>
<module>aws2-kinesis</module>
<module>barcode</module>
<module>beanio</module>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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
*
* http://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.
*/
package org.apache.camel.quarkus.component.aws2.eventbridge.deployment;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
import org.jboss.jandex.DotName;
import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;

class Aws2EventbridgeProcessor {

private static final String FEATURE = "camel-aws2-eventbridge";

public static final String AWS_SDK_APPLICATION_ARCHIVE_MARKERS = "software/amazon/awssdk";

private static final List<String> INTERCEPTOR_PATHS = Arrays.asList(
"software/amazon/awssdk/global/handlers/execution.interceptors");

private static final DotName EXECUTION_INTERCEPTOR_NAME = DotName.createSimple(ExecutionInterceptor.class.getName());

@BuildStep
FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
}

@BuildStep(applicationArchiveMarkers = { AWS_SDK_APPLICATION_ARCHIVE_MARKERS })
void process(CombinedIndexBuildItem combinedIndexBuildItem,
BuildProducer<ReflectiveClassBuildItem> reflectiveClasses,
BuildProducer<NativeImageResourceBuildItem> resource) {

INTERCEPTOR_PATHS.forEach(path -> resource.produce(new NativeImageResourceBuildItem(path)));

List<String> knownInterceptorImpls = combinedIndexBuildItem.getIndex()
.getAllKnownImplementors(EXECUTION_INTERCEPTOR_NAME)
.stream()
.map(c -> c.name().toString()).collect(Collectors.toList());

reflectiveClasses.produce(new ReflectiveClassBuildItem(false, false,
knownInterceptorImpls.toArray(new String[knownInterceptorImpls.size()])));

reflectiveClasses.produce(new ReflectiveClassBuildItem(true, false,
String.class.getCanonicalName()));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,5 @@
<modules>
<module>deployment</module>
<module>runtime</module>
<module>integration-test</module>
</modules>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

<properties>
<camel.quarkus.jvmSince>1.4.0</camel.quarkus.jvmSince>
<camel.quarkus.nativeSince>1.7.0</camel.quarkus.nativeSince>
</properties>

<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@
name: "Camel AWS 2 Eventbridge"
description: "Manage AWS Eventbridge cluster instances using AWS SDK version 2.x"
metadata:
unlisted: true
guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/aws2-eventbridge.html"
categories:
- "integration"
status:
- "preview"
- "stable"
1 change: 1 addition & 0 deletions extensions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
<module>aws2-ec2</module>
<module>aws2-ecs</module>
<module>aws2-eks</module>
<module>aws2-eventbridge</module>
<module>aws2-iam</module>
<module>aws2-kms</module>
<module>aws2-lambda</module>
Expand Down
17 changes: 17 additions & 0 deletions integration-tests/aws2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-aws2-eks</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-aws2-eventbridge</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-aws2-iam</artifactId>
Expand Down Expand Up @@ -194,6 +198,19 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-aws2-eventbridge-deployment</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-aws2-iam-deployment</artifactId>
Expand Down

0 comments on commit adbe6ba

Please sign in to comment.