This is an automated email from the ASF dual-hosted git repository.

reta pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/main by this push:
     new 1dfcfd5871 CXF-9188: Update Maven Archetypes and 'JAX-RS: Maven 
Plugins' guide (#2779)
1dfcfd5871 is described below

commit 1dfcfd5871fce66ecbe544239bc65faf95e00d78
Author: Andriy Redko <[email protected]>
AuthorDate: Thu Dec 11 17:46:41 2025 -0500

    CXF-9188: Update Maven Archetypes and 'JAX-RS: Maven Plugins' guide (#2779)
---
 .../src/main/resources/archetype-resources/pom.xml | 43 +++++++++++++++-------
 .../src/main/resources/archetype-resources/pom.xml | 36 +++++++++++++-----
 .../src/main/resources/archetype-resources/pom.xml | 36 +++++++++++++-----
 3 files changed, 83 insertions(+), 32 deletions(-)

diff --git 
a/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/pom.xml
 
b/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/pom.xml
index e3c67aa4e6..cbc97b94fa 100644
--- 
a/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/pom.xml
+++ 
b/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/pom.xml
@@ -44,9 +44,21 @@
         <pluginManagement>
             <plugins>
                 <plugin>
-                    <groupId>org.apache.tomcat.maven</groupId>
-                    <artifactId>tomcat7-maven-plugin</artifactId>
-                    <version>2.0</version>
+                    <groupId>org.codehaus.cargo</groupId>
+                    <artifactId>cargo-maven3-plugin</artifactId>
+                    <version>1.10.25</version>
+                    <configuration>
+                        <container>
+                            <containerId>tomcat11x</containerId>
+                        </container>
+                        <deployables>
+                            <deployable>
+                                <properties>
+                                    <context>/jaxrs-service</context>
+                                </properties>
+                            </deployable>
+                        </deployables>
+                    </configuration>
                     <executions>
                         <execution>
                             <id>default-cli</id>
@@ -54,9 +66,11 @@
                                 <goal>run</goal>
                             </goals>
                             <configuration>
-                                <port>13000</port>
-                                <path>/jaxrs-service</path>
-                                
<useSeparateTomcatClassLoader>true</useSeparateTomcatClassLoader>
+                                <configuration>
+                                    <portNames>
+                                        <portName>13000</portName>
+                                    </portNames>
+                                </configuration>
                             </configuration>
                         </execution>
                     </executions>
@@ -102,26 +116,27 @@
                 </executions>
             </plugin>
             <plugin>
-                <groupId>org.apache.tomcat.maven</groupId>
-                <artifactId>tomcat7-maven-plugin</artifactId>
+                <groupId>org.codehaus.cargo</groupId>
+                <artifactId>cargo-maven3-plugin</artifactId>
                 <executions>
                     <execution>
                         <id>start-tomcat</id>
                         <goals>
-                            <goal>run-war</goal>
+                            <goal>start</goal>
                         </goals>
                         <phase>pre-integration-test</phase>
                         <configuration>
-                            <port>${test.server.port}</port>
-                            <path>/jaxrs-service</path>
-                            <fork>true</fork>
-                            
<useSeparateTomcatClassLoader>true</useSeparateTomcatClassLoader>
+                            <configuration>
+                                <properties>
+                                    
<cargo.servlet.port>${test.server.port}</cargo.servlet.port>
+                                </properties>
+                            </configuration>
                         </configuration>
                     </execution>
                     <execution>
                         <id>stop-tomcat</id>
                         <goals>
-                            <goal>shutdown</goal>
+                            <goal>stop</goal>
                         </goals>
                         <phase>post-integration-test</phase>
                         <configuration>
diff --git 
a/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/pom.xml
 
b/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/pom.xml
index 12dc213d8b..7c9a006ce8 100644
--- 
a/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/pom.xml
+++ 
b/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/pom.xml
@@ -34,6 +34,11 @@
             <artifactId>cxf-rt-transports-http</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context</artifactId>
+            <version>${cxf.spring.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-web</artifactId>
@@ -51,27 +56,40 @@
         <pluginManagement>
             <plugins>
                 <plugin>
-                    <!-- mvn clean install tomcat:run-war to deploy
+                    <!-- mvn clean install cargo:run to deploy
                     Look for "Running war on http://xxx"; and
                     "Setting the server's publish address to be /yyy"
                     in console output; WSDL browser address will be
                     concatenation of the two: http://xxx/yyy?wsdl
                     -->
-                    <groupId>org.apache.tomcat.maven</groupId>
-                    <artifactId>tomcat7-maven-plugin</artifactId>
-                    <version>2.0</version>
+                    <groupId>org.codehaus.cargo</groupId>
+                    <artifactId>cargo-maven3-plugin</artifactId>
+                    <version>1.10.25</version>
+                    <configuration>
+                        <container>
+                            <containerId>tomcat11x</containerId>
+                        </container>
+                        <deployables>
+                            <deployable>
+                                <properties>
+                                    <context>/webservice</context>
+                                </properties>
+                            </deployable>
+                        </deployables>
+                    </configuration>
                     <executions>
                         <execution>
                             <id>start-tomcat</id>
                             <goals>
-                                <goal>run-war</goal>
+                                <goal>run</goal>
                             </goals>
                             <phase>pre-integration-test</phase>
                             <configuration>
-                                <port>${test.server.port}</port>
-                                <path>/webservice</path>
-                                <fork>true</fork>
-                                
<useSeparateTomcatClassLoader>true</useSeparateTomcatClassLoader>
+                                <configuration>
+                                    <properties>
+                                        
<cargo.servlet.port>${test.server.port}</cargo.servlet.port>
+                                    </properties>
+                                </configuration>
                             </configuration>
                         </execution>
                     </executions>
diff --git 
a/maven-plugins/archetypes/cxf-jaxws-wsdlfirst/src/main/resources/archetype-resources/pom.xml
 
b/maven-plugins/archetypes/cxf-jaxws-wsdlfirst/src/main/resources/archetype-resources/pom.xml
index ff5e4fa83e..73426487af 100644
--- 
a/maven-plugins/archetypes/cxf-jaxws-wsdlfirst/src/main/resources/archetype-resources/pom.xml
+++ 
b/maven-plugins/archetypes/cxf-jaxws-wsdlfirst/src/main/resources/archetype-resources/pom.xml
@@ -34,6 +34,11 @@
             <artifactId>cxf-rt-transports-http</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context</artifactId>
+            <version>${cxf.spring.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-web</artifactId>
@@ -78,27 +83,40 @@
         <pluginManagement>
             <plugins>
                 <plugin>
-                    <!-- mvn clean install tomcat7:run to deploy
+                    <!-- mvn clean install cargo:run to deploy
                     Look for "Running war on http://xxx"; and
                     "Setting the server's publish address to be /yyy"
                     in console output; WSDL browser address will be
                     concatenation of the two: http://xxx/yyy?wsdl
                     -->
-                    <groupId>org.apache.tomcat.maven</groupId>
-                    <artifactId>tomcat7-maven-plugin</artifactId>
-                    <version>2.0</version>
+                    <groupId>org.codehaus.cargo</groupId>
+                    <artifactId>cargo-maven3-plugin</artifactId>
+                    <version>1.10.25</version>
+                    <configuration>
+                        <container>
+                            <containerId>tomcat11x</containerId>
+                        </container>
+                        <deployables>
+                            <deployable>
+                                <properties>
+                                    <context>/webservice</context>
+                                </properties>
+                            </deployable>
+                        </deployables>
+                    </configuration>
                     <executions>
                         <execution>
                             <id>start-tomcat</id>
                             <goals>
-                                <goal>run-war</goal>
+                                <goal>run</goal>
                             </goals>
                             <phase>pre-integration-test</phase>
                             <configuration>
-                                <port>${test.server.port}</port>
-                                <path>/webservice</path>
-                                <fork>true</fork>
-                                
<useSeparateTomcatClassLoader>true</useSeparateTomcatClassLoader>
+                                <configuration>
+                                    <properties>
+                                        
<cargo.servlet.port>${test.server.port}</cargo.servlet.port>
+                                    </properties>
+                                </configuration>
                             </configuration>
                         </execution>
                     </executions>

Reply via email to