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

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


The following commit(s) were added to refs/heads/main by this push:
     new 0a51438da [integeration-tests] Move groovy script in dedicated file 
for jakarata-ee
0a51438da is described below

commit 0a51438da4103a95138180b6cad338fbe26ae307
Author: francois papon <[email protected]>
AuthorDate: Sun Nov 2 21:54:04 2025 +0100

    [integeration-tests] Move groovy script in dedicated file for jakarata-ee
---
 integration-tests/jakarta-ee/pom.xml               | 37 +---------------------
 .../jakarta-ee/src/main/resources/script.groovy    | 18 +++++++++++
 2 files changed, 19 insertions(+), 36 deletions(-)

diff --git a/integration-tests/jakarta-ee/pom.xml 
b/integration-tests/jakarta-ee/pom.xml
index 4d0eccdf0..fc9a5d2cc 100644
--- a/integration-tests/jakarta-ee/pom.xml
+++ b/integration-tests/jakarta-ee/pom.xml
@@ -374,42 +374,7 @@
                         </goals>
                         <configuration>
                             <scripts>
-                                <script><![CDATA[
-                                    def executor_number = 
System.getenv('EXECUTOR_NUMBER')
-                                    if (executor_number != null) {
-                                        final int port_increment = 100
-                                        final int admin_port_increment = 48
-                                        int portbase = 4900 + (executor_number 
as int) * port_increment
-                                        int adminPort
-                                        // find a free port
-                                        for (; portbase < 10000; portbase += 
port_increment) {
-                                        def server_socket
-                                        adminPort = portbase + 
admin_port_increment
-                                            try {
-                                                server_socket = new 
ServerSocket()
-                                                server_socket.setReuseAddress 
true
-                                                server_socket.bind(new 
InetSocketAddress(adminPort))
-                                                break
-                                            } catch (IOException e) {
-                                                println "Admin port $adminPort 
is busy, trying next"
-                                            } finally {
-                                                server_socket?.close()
-                                            }
-                                        }
-
-                                        int httpsPort = portbase + 81
-
-                                        project.properties.'payara.portbase' = 
portbase as String
-                                        project.properties.'payara.adminport' 
= adminPort as String
-                                        project.properties.'payara.argLine' = 
"-DadminPort=$adminPort -Dpayara.https.port=$httpsPort" as String
-                                        
project.properties.'payara.restart.skip' = 
project.properties.'payara.start.skip'
-                                        println "Payara: portbase = 
${project.properties.'payara.portbase'}, " +
-                                                "argLine = 
${project.properties.'payara.argLine'}"
-                                    } else {
-                                        project.properties.'payara.argLine' = 
''
-                                        
project.properties.'payara.restart.skip' = 'true'
-                                    }
-                                    ]]></script>
+                                
<script>${project.basedir}/src/main/resources/script.groovy</script>
                             </scripts>
                         </configuration>
                     </execution>
diff --git a/integration-tests/jakarta-ee/src/main/resources/script.groovy 
b/integration-tests/jakarta-ee/src/main/resources/script.groovy
index 8bddc38a6..b734a4ad0 100644
--- a/integration-tests/jakarta-ee/src/main/resources/script.groovy
+++ b/integration-tests/jakarta-ee/src/main/resources/script.groovy
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 def executor_number = System.getenv('EXECUTOR_NUMBER')
 if (executor_number != null) {
     final int port_increment = 100

Reply via email to