This is an automated email from the ASF dual-hosted git repository. reta pushed a commit to branch 3.6.x-fixes in repository https://gitbox.apache.org/repos/asf/cxf.git
commit b3cbe2ba6deae421b6f6ff133abcf0b7b1f104e0 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) (cherry picked from commit 97219ffe0e4557331e76381ff5c0f5cb8db06f81) (cherry picked from commit 4e8a068a1a93debf650da03c2accdcb109f4a737) --- .../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 adde535fe1..fb0f825e32 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>tomcat9x</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 f58a666bf5..9da428800e 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>tomcat9x</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 b19e77e767..cf3d0d3ca8 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>tomcat9x</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>
