You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pp...@apache.org on 2023/04/20 09:04:16 UTC
[camel-quarkus] 03/05: Replace cxf-codegen-plugin with quarkus-cxf wdsl2java code generation
This is an automated email from the ASF dual-hosted git repository.
ppalaga pushed a commit to branch 2.13.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 2b737653058b9e4bd6944597231530f7795def9b
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Thu Apr 20 00:34:38 2023 +0200
Replace cxf-codegen-plugin with quarkus-cxf wdsl2java code generation
---
.../cxf-soap/cxf-soap-client/pom.xml | 47 +++++++----------
.../src/main/resources/application.properties | 7 +++
.../cxf-soap/cxf-soap-server/pom.xml | 60 ++++++++--------------
.../src/main/resources/application.properties | 10 ++++
.../cxf-soap/cxf-soap-ws-security-client/pom.xml | 47 ++++++++---------
.../src/main/resources/application.properties | 6 +++
6 files changed, 84 insertions(+), 93 deletions(-)
diff --git a/integration-test-groups/cxf-soap/cxf-soap-client/pom.xml b/integration-test-groups/cxf-soap/cxf-soap-client/pom.xml
index 493a2370f5..a2d44f04b9 100644
--- a/integration-test-groups/cxf-soap/cxf-soap-client/pom.xml
+++ b/integration-test-groups/cxf-soap/cxf-soap-client/pom.xml
@@ -30,34 +30,6 @@
<name>Camel Quarkus :: Integration Tests :: Cxf Soap Client</name>
<description>Integration tests for Camel Quarkus CXF extension client part</description>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-codegen-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>wsdl2java</goal>
- </goals>
- <configuration>
- <wsdlOptions>
- <wsdlOption>
- <wsdl>${basedir}/src/main/resources/wsdl/CalculatorService.wsdl</wsdl>
- <wsdlLocation>classpath:wsdl/CalculatorService.wsdl</wsdlLocation>
- </wsdlOption>
- <wsdlOption>
- <wsdl>${basedir}/src/main/resources/wsdl/BasicAuthCalculatorService.wsdl</wsdl>
- <wsdlLocation>classpath:wsdl/BasicAuthCalculatorService.wsdl</wsdlLocation>
- </wsdlOption>
- </wsdlOptions>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
<dependencies>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
@@ -111,6 +83,25 @@
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>${quarkus.platform.group-id}</groupId>
+ <artifactId>quarkus-maven-plugin</artifactId>
+ <version>${quarkus.platform.version}</version>
+ <extensions>true</extensions><!-- Workaround for https://github.com/quarkusio/quarkus/issues/21718 -->
+ <executions>
+ <execution>
+ <id>generate-code</id>
+ <goals>
+ <goal>generate-code</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
<profiles>
<profile>
<id>native</id>
diff --git a/integration-test-groups/cxf-soap/cxf-soap-client/src/main/resources/application.properties b/integration-test-groups/cxf-soap/cxf-soap-client/src/main/resources/application.properties
index 574727024a..10af40d4a9 100644
--- a/integration-test-groups/cxf-soap/cxf-soap-client/src/main/resources/application.properties
+++ b/integration-test-groups/cxf-soap/cxf-soap-client/src/main/resources/application.properties
@@ -17,3 +17,10 @@
quarkus.cxf.path=/soapservice
quarkus.native.resources.includes = wsdl/*.wsdl
+# disable the root config
+quarkus.cxf.codegen.wsdl2java.includes = none.wsdl
+# ... and do everything with named parameter sets so that it works in the grouped module
+quarkus.cxf.codegen.wsdl2java.CalculatorService.includes = wsdl/CalculatorService.wsdl
+quarkus.cxf.codegen.wsdl2java.CalculatorService.additional-params = -wsdlLocation,classpath:wsdl/CalculatorService.wsdl
+quarkus.cxf.codegen.wsdl2java.BasicAuthCalculatorService.includes = wsdl/BasicAuthCalculatorService.wsdl
+quarkus.cxf.codegen.wsdl2java.BasicAuthCalculatorService.additional-params = -wsdlLocation,classpath:wsdl/BasicAuthCalculatorService.wsdl
diff --git a/integration-test-groups/cxf-soap/cxf-soap-server/pom.xml b/integration-test-groups/cxf-soap/cxf-soap-server/pom.xml
index 49171fbe00..ce69ffd39e 100644
--- a/integration-test-groups/cxf-soap/cxf-soap-server/pom.xml
+++ b/integration-test-groups/cxf-soap/cxf-soap-server/pom.xml
@@ -30,43 +30,6 @@
<name>Camel Quarkus :: Integration Tests :: Cxf Soap Server</name>
<description>Integration tests for Camel Quarkus CXF extension server part</description>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-codegen-plugin</artifactId>
- <executions>
- <execution>
- <id>generate-sources</id>
- <phase>generate-sources</phase>
- <configuration>
- <sourceRoot>${project.build.directory}/generated-sources</sourceRoot>
- <wsdlOptions>
- <wsdlOption>
- <wsdl>${basedir}/src/main/resources/wsdl/HelloService.wsdl</wsdl>
- <wsdlLocation>classpath:wsdl/HelloService.wsdl</wsdlLocation>
- <extraargs>
- <extraarg>-xjc-Xts</extraarg>
- </extraargs>
- </wsdlOption>
- </wsdlOptions>
- </configuration>
- <goals>
- <goal>wsdl2java</goal>
- </goals>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.apache.cxf.xjcplugins</groupId>
- <artifactId>cxf-xjc-ts</artifactId>
- <version>${cxf.xjc-utils.version}</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </build>
-
<dependencies>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
@@ -78,8 +41,8 @@
</dependency>
<dependency>
- <groupId>org.apache.cxf.xjc-utils</groupId>
- <artifactId>cxf-xjc-runtime</artifactId>
+ <groupId>io.quarkiverse.cxf</groupId>
+ <artifactId>quarkus-cxf-xjc-plugins</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
@@ -104,6 +67,25 @@
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>${quarkus.platform.group-id}</groupId>
+ <artifactId>quarkus-maven-plugin</artifactId>
+ <version>${quarkus.platform.version}</version>
+ <extensions>true</extensions><!-- Workaround for https://github.com/quarkusio/quarkus/issues/21718 -->
+ <executions>
+ <execution>
+ <id>generate-code</id>
+ <goals>
+ <goal>generate-code</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
<profiles>
<profile>
<id>native</id>
diff --git a/integration-test-groups/cxf-soap/cxf-soap-server/src/main/resources/application.properties b/integration-test-groups/cxf-soap/cxf-soap-server/src/main/resources/application.properties
index 574727024a..9b23797edf 100644
--- a/integration-test-groups/cxf-soap/cxf-soap-server/src/main/resources/application.properties
+++ b/integration-test-groups/cxf-soap/cxf-soap-server/src/main/resources/application.properties
@@ -17,3 +17,13 @@
quarkus.cxf.path=/soapservice
quarkus.native.resources.includes = wsdl/*.wsdl
+
+# disable the root config
+quarkus.cxf.codegen.wsdl2java.includes = none.wsdl
+# ... and do everything with named parameter sets so that it works in the grouped module
+quarkus.cxf.codegen.wsdl2java.server.includes = wsdl/HelloService.wsdl
+quarkus.cxf.codegen.wsdl2java.server.additional-params = -wsdlLocation,classpath:wsdl/HelloService.wsdl,-xjc-Xts
+
+# java2ws
+quarkus.cxf.java2ws.includes=org.apache.camel.quarkus.component.cxf.soap.server.it.CodeFirstService
+quarkus.cxf.java2ws.wsdl-name-template=%TARGET_DIR%/Java2wsTest/%SIMPLE_CLASS_NAME%-from-java2ws.wsdl
diff --git a/integration-test-groups/cxf-soap/cxf-soap-ws-security-client/pom.xml b/integration-test-groups/cxf-soap/cxf-soap-ws-security-client/pom.xml
index b6474990d2..594e90ff8d 100644
--- a/integration-test-groups/cxf-soap/cxf-soap-ws-security-client/pom.xml
+++ b/integration-test-groups/cxf-soap/cxf-soap-ws-security-client/pom.xml
@@ -30,30 +30,6 @@
<name>Camel Quarkus :: Integration Tests :: CXF SOAP WS-Security client</name>
<description>Integration tests for Camel Quarkus CXF extension acting as SOAP client accessing an external server having WS-Security enabled</description>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-codegen-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>wsdl2java</goal>
- </goals>
- <configuration>
- <wsdlOptions>
- <wsdlOption>
- <wsdl>${basedir}/src/main/resources/wsdl/WssCalculatorService.wsdl</wsdl>
- <wsdlLocation>classpath:wsdl/wsdl/WssCalculatorService.wsdl</wsdlLocation>
- </wsdlOption>
- </wsdlOptions>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
<dependencies>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
@@ -74,8 +50,8 @@
</dependency>
<dependency>
- <groupId>org.apache.cxf.xjc-utils</groupId>
- <artifactId>cxf-xjc-runtime</artifactId>
+ <groupId>io.quarkiverse.cxf</groupId>
+ <artifactId>quarkus-cxf-xjc-plugins</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
@@ -111,6 +87,25 @@
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>${quarkus.platform.group-id}</groupId>
+ <artifactId>quarkus-maven-plugin</artifactId>
+ <version>${quarkus.platform.version}</version>
+ <extensions>true</extensions><!-- Workaround for https://github.com/quarkusio/quarkus/issues/21718 -->
+ <executions>
+ <execution>
+ <id>generate-code</id>
+ <goals>
+ <goal>generate-code</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
<profiles>
<profile>
<id>native</id>
diff --git a/integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/main/resources/application.properties b/integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/main/resources/application.properties
index 574727024a..839a0bd602 100644
--- a/integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/main/resources/application.properties
+++ b/integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/main/resources/application.properties
@@ -17,3 +17,9 @@
quarkus.cxf.path=/soapservice
quarkus.native.resources.includes = wsdl/*.wsdl
+
+# disable the root config
+quarkus.cxf.codegen.wsdl2java.includes = none.wsdl
+# ... and do everything with named parameter sets so that it works in the grouped module
+quarkus.cxf.codegen.wsdl2java.security-client.includes = wsdl/WssCalculatorService.wsdl
+quarkus.cxf.codegen.wsdl2java.security-client.additional-params = -wsdlLocation,classpath:wsdl/WssCalculatorService.wsdl