forked from apache/camel-quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Camel AS2 Modules as Quarkus Extension apache#1471
- Loading branch information
1 parent
8c76e23
commit 0c43a19
Showing
29 changed files
with
1,507 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Do not edit directly! | ||
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page | ||
|
||
[[as2]] | ||
= AS2 | ||
|
||
[.badges] | ||
[.badge-key]##Since Camel Quarkus##[.badge-version]##1.0.0-CR4## [.badge-key]##JVM##[.badge-supported]##supported## [.badge-key]##Native##[.badge-supported]##supported## | ||
|
||
Transfer data securely and reliably using the AS2 protocol (RFC4130). | ||
|
||
== What's inside | ||
|
||
* https://camel.apache.org/components/latest/as2-component.html[AS2 component], URI syntax: `as2:apiName/methodName` | ||
|
||
Please refer to the above link for usage and configuration details. | ||
|
||
== Maven coordinates | ||
|
||
[source,xml] | ||
---- | ||
<dependency> | ||
<groupId>org.apache.camel.quarkus</groupId> | ||
<artifactId>camel-quarkus-as2</artifactId> | ||
</dependency> | ||
---- | ||
|
||
Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications. | ||
|
||
== SSL in native mode | ||
|
||
This extension auto-enables SSL support in native mode. Hence you do not need to add | ||
`quarkus.ssl.native=true` to your `application.properties` yourself. See also | ||
https://quarkus.io/guides/native-and-ssl[Quarkus SSL guide]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
...rg/apache/camel/quarkus/support/bouncycastle/deployment/BouncycastleSupportProcessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* 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.support.bouncycastle.deployment; | ||
|
||
public class BouncycastleSupportProcessor { | ||
static final String FEATURE = "camel-support-bouncycastle"; | ||
// | ||
// @BuildStep | ||
// FeatureBuildItem feature() { | ||
// return new FeatureBuildItem(FEATURE); | ||
// } | ||
// | ||
// @BuildStep | ||
// ReflectiveClassBuildItem registerForReflection(CombinedIndexBuildItem combinedIndex) { | ||
// IndexView index = combinedIndex.getIndex(); | ||
// | ||
// String[] dtos = index.getKnownClasses().stream().map(ci -> ci.name().toString()) | ||
// .filter(n -> n.startsWith("org.apache.kafka.connect.json") | ||
// || n.startsWith("io.debezium.embedded.spi")) | ||
// .sorted() | ||
// .toArray(String[]::new); | ||
// | ||
// return new ReflectiveClassBuildItem(false, true, dtos); | ||
// } | ||
// | ||
// @BuildStep | ||
// ReflectiveClassBuildItem reflectiveClasses() { | ||
// return new ReflectiveClassBuildItem(false, false, | ||
// new String[] { "org.apache.kafka.connect.storage.FileOffsetBackingStore", | ||
// "org.apache.kafka.connect.storage.MemoryOffsetBackingStore", | ||
// "io.debezium.relational.history.FileDatabaseHistory" }); | ||
// } | ||
// | ||
// @BuildStep | ||
// void addDependencies(BuildProducer<IndexDependencyBuildItem> indexDependency) { | ||
// indexDependency.produce(new IndexDependencyBuildItem("org.apache.kafka", "connect-json")); | ||
// indexDependency.produce(new IndexDependencyBuildItem("io.debezium", "debezium-embedded")); | ||
// } | ||
} |
61 changes: 0 additions & 61 deletions
61
...n/java/org/apache/camel/quarkus/support/debezium/deployment/DebeziumSupportProcessor.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
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. | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.apache.camel.quarkus</groupId> | ||
<artifactId>camel-quarkus-as2-parent</artifactId> | ||
<version>1.1.0-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>camel-quarkus-as2-deployment</artifactId> | ||
<name>Camel Quarkus :: AS2 :: Deployment</name> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.apache.camel.quarkus</groupId> | ||
<artifactId>camel-quarkus-core-deployment</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.camel.quarkus</groupId> | ||
<artifactId>camel-quarkus-as2</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.camel.quarkus</groupId> | ||
<artifactId>camel-quarkus-support-bouncycastle-deployment</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<annotationProcessorPaths> | ||
<path> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-extension-processor</artifactId> | ||
<version>${quarkus.version}</version> | ||
</path> | ||
</annotationProcessorPaths> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
83 changes: 83 additions & 0 deletions
83
...loyment/src/main/java/org/apache/camel/quarkus/component/as2/deployment/As2Processor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/* | ||
* 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.as2.deployment; | ||
|
||
import io.quarkus.deployment.annotations.BuildStep; | ||
import io.quarkus.deployment.builditem.CombinedIndexBuildItem; | ||
import io.quarkus.deployment.builditem.FeatureBuildItem; | ||
import io.quarkus.deployment.builditem.IndexDependencyBuildItem; | ||
import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem; | ||
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem; | ||
import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem; | ||
import org.apache.camel.component.as2.AS2ClientManagerEndpointConfiguration; | ||
import org.apache.camel.component.as2.AS2ServerManagerEndpointConfiguration; | ||
import org.apache.camel.quarkus.core.deployment.spi.UnbannedReflectiveBuildItem; | ||
import org.jboss.jandex.IndexView; | ||
|
||
class As2Processor { | ||
|
||
private static final String FEATURE = "camel-as2"; | ||
|
||
@BuildStep | ||
FeatureBuildItem feature() { | ||
return new FeatureBuildItem(FEATURE); | ||
} | ||
|
||
@BuildStep | ||
RuntimeInitializedClassBuildItem runtimeInitializedClasses() { | ||
return new RuntimeInitializedClassBuildItem("org.apache.camel.component.as2.api.util.AS2Utils"); | ||
} | ||
|
||
@BuildStep | ||
UnbannedReflectiveBuildItem whitelistConfigurationClasses() { | ||
return new UnbannedReflectiveBuildItem( | ||
AS2ServerManagerEndpointConfiguration.class.getCanonicalName(), | ||
AS2ClientManagerEndpointConfiguration.class.getCanonicalName()); | ||
} | ||
|
||
@BuildStep | ||
ReflectiveClassBuildItem registerAs2ConfigurationForReflection() { | ||
return new ReflectiveClassBuildItem(true, false, | ||
AS2ServerManagerEndpointConfiguration.class.getCanonicalName(), | ||
AS2ClientManagerEndpointConfiguration.class.getCanonicalName()); | ||
} | ||
|
||
@BuildStep | ||
ReflectiveClassBuildItem registerForReflection(CombinedIndexBuildItem combinedIndex) { | ||
IndexView index = combinedIndex.getIndex(); | ||
|
||
String[] dtos = index.getKnownClasses().stream() | ||
.map(ci -> ci.name().toString()) | ||
.filter(n -> n.startsWith("org.apache.velocity.runtime") || n.startsWith("org.apache.velocity.util")) | ||
.sorted() | ||
.peek(System.out::println) | ||
.toArray(String[]::new); | ||
|
||
return new ReflectiveClassBuildItem(false, false, dtos); | ||
} | ||
|
||
@BuildStep | ||
IndexDependencyBuildItem registerDependencyForIndex() { | ||
return new IndexDependencyBuildItem("org.apache.velocity", "velocity-engine-core"); | ||
} | ||
|
||
@BuildStep | ||
NativeImageResourceBuildItem initResources() { | ||
return new NativeImageResourceBuildItem("org/apache/velocity/runtime/defaults/velocity.properties", | ||
"org/apache/velocity/runtime/defaults/directive.properties"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
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. | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.apache.camel.quarkus</groupId> | ||
<artifactId>camel-quarkus-build-parent</artifactId> | ||
<version>1.1.0-SNAPSHOT</version> | ||
<relativePath>../../poms/build-parent/pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>camel-quarkus-as2-parent</artifactId> | ||
<name>Camel Quarkus :: AS2</name> | ||
<packaging>pom</packaging> | ||
|
||
<modules> | ||
<module>deployment</module> | ||
<module>runtime</module> | ||
</modules> | ||
</project> |
Oops, something went wrong.