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

remm pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/tomcat-maven-plugin.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 1b0a2f9  Fix issues found with the integration tests
1b0a2f9 is described below

commit 1b0a2f95c50b7fef104da3d563e540774d570dc8
Author: remm <[email protected]>
AuthorDate: Tue Apr 14 13:16:19 2026 +0200

    Fix issues found with the integration tests
---
 pom.xml                                            | 40 ++++++++++++++++++++--
 .../tomcat/maven/common/run/EmbeddedRegistry.java  |  1 -
 .../maven/plugin/tomcat/run/AbstractRunMojo.java   | 16 ++++-----
 3 files changed, 44 insertions(+), 13 deletions(-)

diff --git a/pom.xml b/pom.xml
index ca56a56..ba99c77 100644
--- a/pom.xml
+++ b/pom.xml
@@ -80,6 +80,7 @@
         <its.ajp.port>2001</its.ajp.port>
         <!-- server port for it tests -->
         <its.server.port>2008</its.server.port>
+
         <tomcatVersion>9.0.117</tomcatVersion>
         <!-- Tomcat 10 and 11 should skip tests -->
         <!--<tomcatVersion>11.0.21</tomcatVersion>-->
@@ -92,6 +93,7 @@
         
<tomcat-maven.siteUrlDeployment>file://${tomcat-maven.siteFilePath}</tomcat-maven.siteUrlDeployment>
         <tomcat-maven.scmPubCheckoutDirectory>
             
${user.home}/tomcat-maven-plugin-${project.version}-content</tomcat-maven.scmPubCheckoutDirectory>
+        <managerWebAppPath>${basedir}/target/</managerWebAppPath>
 
     </properties>
 
@@ -346,6 +348,23 @@
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-failsafe-plugin</artifactId>
                     <version>${failsafe.version}</version>
+                    <configuration>
+                        <excludes>
+                            <exclude>**/deploy-only-war-project/**</exclude>
+                            <exclude>**/deploy-war-project/**</exclude>
+                            <exclude>**/simple-war-project/**</exclude>
+                            <exclude>**/tomcat-run-multi-config/**</exclude>
+                            <exclude>**/Abstract*.java</exclude>
+                        </excludes>
+                    </configuration>
+                    <executions>
+                        <execution>
+                            <goals>
+                                <goal>integration-test</goal>
+                                <goal>verify</goal>
+                            </goals>
+                        </execution>
+                    </executions>
                 </plugin>
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
@@ -425,8 +444,7 @@
                             <inputExclude>*.patch</inputExclude>
                             <inputExclude>**/access_log.*</inputExclude>
                             
<inputExclude>**/src/test/resources/**/goal.txt</inputExclude>
-                            <inputExclude>
-                                
**/src/test/resources/**/archetype.properties</inputExclude>
+                            
<inputExclude>**/src/test/resources/**/archetype.properties</inputExclude>
                         </inputExcludes>
                     </configuration>
                 </plugin>
@@ -498,6 +516,24 @@
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>pre-integration-test</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <target>
+                                <unzip src="src/test/manager.war"
+                                    dest="${managerWebAppPath}" />
+                            </target>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 
diff --git 
a/src/main/java/org/apache/tomcat/maven/common/run/EmbeddedRegistry.java 
b/src/main/java/org/apache/tomcat/maven/common/run/EmbeddedRegistry.java
index 3a2dba1..63ccdcd 100644
--- a/src/main/java/org/apache/tomcat/maven/common/run/EmbeddedRegistry.java
+++ b/src/main/java/org/apache/tomcat/maven/common/run/EmbeddedRegistry.java
@@ -108,7 +108,6 @@ public final class EmbeddedRegistry
             {
                 Method method = embedded.getClass().getMethod( "stop" );
                 method.invoke( embedded );
-                embedded.getClass().getMethod( "destroy" ).invoke( embedded );
                 iterator.remove();
             }
             catch ( NoSuchMethodException e )
diff --git 
a/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/AbstractRunMojo.java 
b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/AbstractRunMojo.java
index 73883df..4b6fbb4 100644
--- 
a/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/AbstractRunMojo.java
+++ 
b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/AbstractRunMojo.java
@@ -173,13 +173,13 @@ public abstract class AbstractRunMojo
      * NOTE The ajp connector will be started only if {@link #ajpPort} > 0.
      * possible values are:
      * <ul>
-     * <li>org.apache.coyote.ajp.AjpProtocol - new blocking Java connector 
that supports an executor</li>
+     * <li>org.apache.coyote.ajp.AjpNioProtocol - new blocking Java connector 
that supports an executor</li>
      * <li>org.apache.coyote.ajp.AjpAprProtocol - the APR/native 
connector.</li>
      * </ul>
      *
      * @since 2.0
      */
-    @Parameter( property = "maven.tomcat.ajp.protocol", defaultValue = 
"org.apache.coyote.ajp.AjpProtocol" )
+    @Parameter( property = "maven.tomcat.ajp.protocol", defaultValue = 
"org.apache.coyote.ajp.AjpNioProtocol" )
     private String ajpProtocol;
 
     /**
@@ -1119,10 +1119,11 @@ public abstract class AbstractRunMojo
                     httpsConnector.setMaxPostSize( maxPostSize );
                     httpsConnector.setSecure( true );
                     httpsConnector.setProperty( "SSLEnabled", "true" );
-                    // should be default but configure it anyway
-                    httpsConnector.setProperty( "sslProtocol", "TLS" );
+                    httpsConnector.setURIEncoding( uriEncoding );
+                    httpsConnector.setUseBodyEncodingForURI( 
this.useBodyEncodingForURI );
+
                     SSLHostConfig hostConfig = new SSLHostConfig();
-                    SSLHostConfigCertificate certificate = new 
SSLHostConfigCertificate();
+                    SSLHostConfigCertificate certificate = new 
SSLHostConfigCertificate(hostConfig, SSLHostConfigCertificate.DEFAULT_TYPE);
 
                     if ( keystoreFile != null )
                     {
@@ -1172,13 +1173,8 @@ public abstract class AbstractRunMojo
                     {
                         hostConfig.setTruststoreType(truststoreType);
                     }
-
                     hostConfig.setCertificateVerificationAsString(clientAuth);
 
-                    httpsConnector.setURIEncoding( uriEncoding );
-
-                    httpsConnector.setUseBodyEncodingForURI( 
this.useBodyEncodingForURI );
-
                     if ( address != null )
                     {
                         httpsConnector.setProperty( "address", address );


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to