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

jungm pushed a commit to branch ee11
in repository https://gitbox.apache.org/repos/asf/tomee-tck.git

commit 58f353d28e59ae79a167f99e7ec0c3f896820adf
Author: Markus Jung <[email protected]>
AuthorDate: Sat Jul 18 20:32:55 2026 +0200

    Propagate tck.derby.port into the staged tomee.xml datasources
---
 environment/tomee/conf/tomee.xml                   |  9 ++++----
 pom.xml                                            |  4 ++++
 runner-standalone/README.md                        |  7 +++---
 runner-standalone/data/pom.xml                     | 21 -----------------
 .../{tomee-conf-filtered => tomee-conf}/tomee.xml  |  6 ++---
 runner-standalone/pages/pom.xml                    | 21 -----------------
 .../pages/src/tomee-conf-filtered/tomee.xml        | 26 ----------------------
 runner-standalone/pom.xml                          | 10 +++------
 runner-webprofile/run/pom.xml                      | 12 ++++++++--
 9 files changed, 28 insertions(+), 88 deletions(-)

diff --git a/environment/tomee/conf/tomee.xml b/environment/tomee/conf/tomee.xml
index 1ccfcd0..b156f2b 100644
--- a/environment/tomee/conf/tomee.xml
+++ b/environment/tomee/conf/tomee.xml
@@ -1,23 +1,24 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Test-only TomEE resources required by the Jakarta EE Web Profile TCK. -->
+<!-- Test-only TomEE resources required by the Jakarta EE Web Profile TCK.
+     The runner poms substitute ${tck.derby.port} while staging the overlay. 
-->
 <openejb>
   <Resource id="jdbc/DB1" type="DataSource">
     JdbcDriver org.apache.derby.jdbc.ClientDriver
-    JdbcUrl jdbc:derby://localhost:1527/derbyDB;create=true
+    JdbcUrl jdbc:derby://localhost:${tck.derby.port}/derbyDB;create=true
     UserName cts1
     Password cts1
   </Resource>
 
   <Resource id="jdbc/DB2" type="DataSource">
     JdbcDriver org.apache.derby.jdbc.ClientDriver
-    JdbcUrl jdbc:derby://localhost:1527/derbyDB;create=true
+    JdbcUrl jdbc:derby://localhost:${tck.derby.port}/derbyDB;create=true
     UserName cts1
     Password cts1
   </Resource>
 
   <Resource id="jdbc/DBTimer" type="DataSource">
     JdbcDriver org.apache.derby.jdbc.ClientDriver
-    JdbcUrl jdbc:derby://localhost:1527/derbyDB;create=true
+    JdbcUrl jdbc:derby://localhost:${tck.derby.port}/derbyDB;create=true
     UserName cts1
     Password cts1
   </Resource>
diff --git a/pom.xml b/pom.xml
index e31c0e2..dad7add 100644
--- a/pom.xml
+++ b/pom.xml
@@ -46,6 +46,10 @@
     <jakarta.tags.impl.version>3.0.1</jakarta.tags.impl.version>
     <jakarta.tags.api.version>3.0.2</jakarta.tags.api.version>
     <derby.version>10.15.2.0</derby.version>
+    <!-- Derby network server port; the runner lifecycles and the staged
+         tomee.xml datasources all honour an override, so a suite can run
+         next to another harness instance. -->
+    <tck.derby.port>1527</tck.derby.port>
 
     <maven.antrun.plugin.version>3.1.0</maven.antrun.plugin.version>
     <maven.compiler.plugin.version>3.14.0</maven.compiler.plugin.version>
diff --git a/runner-standalone/README.md b/runner-standalone/README.md
index 3c714df..1dce37f 100644
--- a/runner-standalone/README.md
+++ b/runner-standalone/README.md
@@ -22,10 +22,9 @@ fixed TomEE ports).
 Overriding the ports matters beyond convenience: the Arquillian remote
 adapter attaches to whatever server already answers on the configured http
 port, so a leftover or foreign TomEE on 8080 silently absorbs the
-deployments. For side-by-side runs, override the TomEE ports but keep Derby
-on 1527: overriding `tck.derby.port` breaks the suites whose deployments use
-the shared `tomee.xml` datasources on 1527 (cdi-ee's persistence-context
-tests).
+deployments. `tck.derby.port` propagates into the staged `tomee.xml`
+datasources, so a full side-by-side run overrides it together with the
+TomEE ports.
 
 `TOMEE_CLASSIFIER` selects the distribution, default `plume`. The default
 Maven build compiles these modules but runs nothing; execution requires
diff --git a/runner-standalone/data/pom.xml b/runner-standalone/data/pom.xml
index 5fc5d34..c67ca5b 100644
--- a/runner-standalone/data/pom.xml
+++ b/runner-standalone/data/pom.xml
@@ -92,27 +92,6 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-resources-plugin</artifactId>
-        <executions>
-          <execution>
-            <!-- Replaces the shared tomee.xml (fixed Derby port 1527) with a
-                 filtered copy honouring ${tck.derby.port}; runs after the
-                 inherited stage-tomee-configuration execution. -->
-            <id>stage-port-aware-tomee-configuration</id>
-            <phase>process-test-resources</phase>
-            <goals><goal>copy-resources</goal></goals>
-            <configuration>
-              <skip>${tck.standalone.container.skip}</skip>
-              <overwrite>true</overwrite>
-              
<outputDirectory>${project.build.directory}/tomee-overlay/conf</outputDirectory>
-              <resources>
-                <resource>
-                  
<directory>${project.basedir}/src/tomee-conf-filtered</directory>
-                  <filtering>true</filtering>
-                </resource>
-              </resources>
-            </configuration>
-          </execution>
-        </executions>
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
diff --git a/runner-standalone/data/src/tomee-conf-filtered/tomee.xml 
b/runner-standalone/data/src/tomee-conf/tomee.xml
similarity index 83%
rename from runner-standalone/data/src/tomee-conf-filtered/tomee.xml
rename to runner-standalone/data/src/tomee-conf/tomee.xml
index e76f9fa..b67fbb7 100644
--- a/runner-standalone/data/src/tomee-conf-filtered/tomee.xml
+++ b/runner-standalone/data/src/tomee-conf/tomee.xml
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Port-aware test-only TomEE resources for the Jakarta Data TCK; 
${tck.derby.port}
-     is substituted while staging the overlay. Replaces the shared
+<!-- Test-only TomEE resources for the Jakarta Data TCK; replaces the shared
      overlay tomee.xml so the TCK's jdbc/DataTCK datasource is available in
-     addition to the standard TCK datasources. -->
+     addition to the standard TCK datasources. ${tck.derby.port} is
+     substituted while staging the overlay. -->
 <openejb>
   <Resource id="jdbc/DB1" type="DataSource">
     JdbcDriver org.apache.derby.jdbc.ClientDriver
diff --git a/runner-standalone/pages/pom.xml b/runner-standalone/pages/pom.xml
index 601ccf7..4574fde 100644
--- a/runner-standalone/pages/pom.xml
+++ b/runner-standalone/pages/pom.xml
@@ -85,27 +85,6 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-resources-plugin</artifactId>
-        <executions>
-          <execution>
-            <!-- Replaces the shared tomee.xml (fixed Derby port 1527) with a
-                 filtered copy honouring ${tck.derby.port}; runs after the
-                 inherited stage-tomee-configuration execution. -->
-            <id>stage-port-aware-tomee-configuration</id>
-            <phase>process-test-resources</phase>
-            <goals><goal>copy-resources</goal></goals>
-            <configuration>
-              <skip>${tck.standalone.container.skip}</skip>
-              <overwrite>true</overwrite>
-              
<outputDirectory>${project.build.directory}/tomee-overlay/conf</outputDirectory>
-              <resources>
-                <resource>
-                  
<directory>${project.basedir}/src/tomee-conf-filtered</directory>
-                  <filtering>true</filtering>
-                </resource>
-              </resources>
-            </configuration>
-          </execution>
-        </executions>
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
diff --git a/runner-standalone/pages/src/tomee-conf-filtered/tomee.xml 
b/runner-standalone/pages/src/tomee-conf-filtered/tomee.xml
deleted file mode 100644
index 41f79e9..0000000
--- a/runner-standalone/pages/src/tomee-conf-filtered/tomee.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Port-aware copy of environment/tomee/conf/tomee.xml; ${tck.derby.port} is
-     substituted while staging the overlay so the suite can run beside
-     another harness instance. -->
-<openejb>
-  <Resource id="jdbc/DB1" type="DataSource">
-    JdbcDriver org.apache.derby.jdbc.ClientDriver
-    JdbcUrl jdbc:derby://localhost:${tck.derby.port}/derbyDB;create=true
-    UserName cts1
-    Password cts1
-  </Resource>
-
-  <Resource id="jdbc/DB2" type="DataSource">
-    JdbcDriver org.apache.derby.jdbc.ClientDriver
-    JdbcUrl jdbc:derby://localhost:${tck.derby.port}/derbyDB;create=true
-    UserName cts1
-    Password cts1
-  </Resource>
-
-  <Resource id="jdbc/DBTimer" type="DataSource">
-    JdbcDriver org.apache.derby.jdbc.ClientDriver
-    JdbcUrl jdbc:derby://localhost:${tck.derby.port}/derbyDB;create=true
-    UserName cts1
-    Password cts1
-  </Resource>
-</openejb>
diff --git a/runner-standalone/pom.xml b/runner-standalone/pom.xml
index ddf6c5b..43ed7b7 100644
--- a/runner-standalone/pom.xml
+++ b/runner-standalone/pom.xml
@@ -67,11 +67,6 @@
     <tck.standalone.skip>true</tck.standalone.skip>
     <!-- Modules that only run local signature checks set this to true. -->
     
<tck.standalone.container.skip>${tck.standalone.skip}</tck.standalone.container.skip>
-    <!-- Derby network server port; override together with the tomee.*.port
-         properties below to run a suite next to another harness instance.
-         The shared tomee.xml datasources stay on 1527, which only matters
-         for suites that actually touch the database. -->
-    <tck.derby.port>1527</tck.derby.port>
     <!-- Harness catalog defaults for the TomEE container; the remote
          adapter otherwise attaches to whatever already answers on the http
          port. Modules that pin fixed ports simply ignore these. -->
@@ -149,15 +144,16 @@
                 <overwrite>true</overwrite>
                 
<outputDirectory>${project.build.directory}/tomee-overlay/conf</outputDirectory>
                 <resources>
+                  <!-- Filtering substitutes ${tck.derby.port} in tomee.xml. 
-->
                   <resource>
                     
<directory>${maven.multiModuleProjectDirectory}/environment/tomee/conf</directory>
-                    <filtering>false</filtering>
+                    <filtering>true</filtering>
                   </resource>
                   <!-- Optional module-specific configuration overrides; these
                        are copied last and replace same-named shared files. -->
                   <resource>
                     <directory>${project.basedir}/src/tomee-conf</directory>
-                    <filtering>false</filtering>
+                    <filtering>true</filtering>
                   </resource>
                 </resources>
               </configuration>
diff --git a/runner-webprofile/run/pom.xml b/runner-webprofile/run/pom.xml
index a555e76..8a1a3e3 100644
--- a/runner-webprofile/run/pom.xml
+++ b/runner-webprofile/run/pom.xml
@@ -127,9 +127,10 @@
             <configuration>
               
<outputDirectory>${project.build.directory}/tomee-overlay/conf</outputDirectory>
               <resources>
+                <!-- Filtering substitutes ${tck.derby.port} in tomee.xml. -->
                 <resource>
                   
<directory>${project.basedir}/../../environment/tomee/conf</directory>
-                  <filtering>false</filtering>
+                  <filtering>true</filtering>
                 </resource>
               </resources>
             </configuration>
@@ -212,6 +213,7 @@
                 
<argument>${project.basedir}/../../environment/database/require-derby-port-free.sh</argument>
                 <argument>${java.home}/bin/java</argument>
                 <classpath/>
+                <argument>${tck.derby.port}</argument>
               </arguments>
               <classpathScope>test</classpathScope>
             </configuration>
@@ -239,6 +241,10 @@
               <asyncDestroyOnShutdown>true</asyncDestroyOnShutdown>
               <arguments>
                 
<argument>-Dderby.system.home=${project.build.directory}/derby</argument>
+                <!-- The port travels as a system property because
+                     exec-maven-plugin swallows the value after a literal
+                     -p argument (module-path handling). -->
+                <argument>-Dderby.drda.portNumber=${tck.derby.port}</argument>
                 <argument>-cp</argument>
                 <classpath/>
                 <argument>org.apache.derby.drda.NetworkServerControl</argument>
@@ -258,6 +264,7 @@
                 
<argument>${project.basedir}/../../environment/database/wait-for-derby.sh</argument>
                 <argument>${java.home}/bin/java</argument>
                 <classpath/>
+                <argument>${tck.derby.port}</argument>
               </arguments>
               <classpathScope>test</classpathScope>
             </configuration>
@@ -270,6 +277,7 @@
               <executable>${java.home}/bin/java</executable>
               <classpathScope>test</classpathScope>
               <arguments>
+                <argument>-Dderby.drda.portNumber=${tck.derby.port}</argument>
                 <argument>-cp</argument>
                 <classpath/>
                 <argument>org.apache.derby.drda.NetworkServerControl</argument>
@@ -420,7 +428,7 @@
     <tck.trace>false</tck.trace>
     <tck.ts.home>${java.io.tmpdir}</tck.ts.home>
     <!-- Matches the datasources in environment/tomee/conf/tomee.xml. -->
-    
<tck.jdbc.url>jdbc:derby://localhost:1527/derbyDB;create=true</tck.jdbc.url>
+    
<tck.jdbc.url>jdbc:derby://localhost:${tck.derby.port}/derbyDB;create=true</tck.jdbc.url>
   </properties>
 
   <profiles>

Reply via email to