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

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

commit 1dc1e1f1f8591fd27ab2c3faec8d69cce1456327
Author: opencode <[email protected]>
AuthorDate: Fri Nov 6 16:16:41 2026 +0100

    Clean up OWB module build and test warnings
    
    Rebuild the unshaded JAR before shading to avoid repeated-build warnings, 
skip JVM-wide classloader leak checks in the embedded test server, and clarify 
the Java requirements in the module documentation.
---
 modules/owb/pom.xml                                              | 9 +++++++++
 .../test/java/org/apache/webbeans/web/tomcat/OwbTestServer.java  | 7 +++++++
 webapps/docs/cdi.xml                                             | 8 ++++----
 3 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/modules/owb/pom.xml b/modules/owb/pom.xml
index f6be93d23a..32d1a7ce8a 100644
--- a/modules/owb/pom.xml
+++ b/modules/owb/pom.xml
@@ -135,6 +135,15 @@
                     <release>21</release>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <!-- Always rebuild the unshaded JAR before shading so that
+                         repeated builds do not shade the previously shaded 
JAR. -->
+                    <forceCreation>true</forceCreation>
+                </configuration>
+            </plugin>
             <!-- Create an empty directory used to keep target/classes off the
                  integration test runtime classpath. The tests must run against
                  the shaded JAR. -->
diff --git 
a/modules/owb/src/test/java/org/apache/webbeans/web/tomcat/OwbTestServer.java 
b/modules/owb/src/test/java/org/apache/webbeans/web/tomcat/OwbTestServer.java
index 164e46ef46..d6c8e8723d 100644
--- 
a/modules/owb/src/test/java/org/apache/webbeans/web/tomcat/OwbTestServer.java
+++ 
b/modules/owb/src/test/java/org/apache/webbeans/web/tomcat/OwbTestServer.java
@@ -26,6 +26,7 @@ import java.util.Map;
 import java.util.function.Consumer;
 
 import org.apache.catalina.Context;
+import org.apache.catalina.core.StandardContext;
 import org.apache.catalina.startup.Tomcat;
 
 /**
@@ -91,6 +92,12 @@ final class OwbTestServer implements AutoCloseable {
         Map<String, Context> contexts = new LinkedHashMap<>();
         for (Deployment deployment : deployments) {
             Context context = tomcat.addWebapp(deployment.contextPath(), 
deployment.webapp().toString());
+            if (context instanceof StandardContext standardContext) {
+                // These checks require --add-opens for java.lang and java.rmi.
+                // They are not relevant to the module integration tests.
+                standardContext.setClearReferencesThreadLocals(false);
+                standardContext.setClearReferencesRmiTargets(false);
+            }
             contexts.put(deployment.contextPath(), context);
             if (mode == ListenerMode.CONTEXT) {
                 OpenWebBeansContextLifecycleListener listener = new 
OpenWebBeansContextLifecycleListener();
diff --git a/webapps/docs/cdi.xml b/webapps/docs/cdi.xml
index 32fc23b644..0150dd5d57 100644
--- a/webapps/docs/cdi.xml
+++ b/webapps/docs/cdi.xml
@@ -57,10 +57,10 @@
   <section name="Building">
 
   <p>
-    Building the module requires Java 21 or later, Apache Maven and the Tomcat
-    artifacts for the Tomcat version used by the module in the local Maven
-    repository. The default configuration uses the Tomcat version from the
-    current source tree.
+    Building the module requires Apache Maven, a JDK supported by the Tomcat
+    version used by the module, and the Tomcat artifacts for that version in
+    the local Maven repository. Tomcat 12 requires Java 21; Tomcat 11 requires
+    Java 17. The CDI APIs used by the module require Java 17.
   </p>
 
   <p>


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

Reply via email to