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

lukaszlenart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/struts.git


The following commit(s) were added to refs/heads/master by this push:
     new d5011ae  Supports build on Java 17
d5011ae is described below

commit d5011aef6747ea7549ee80bf337c65f524d38b52
Author: Lukasz Lenart <lukaszlen...@apache.org>
AuthorDate: Mon Oct 18 08:53:26 2021 +0200

    Supports build on Java 17
---
 Jenkinsfile | 36 +++++++++++++++++++++++++++++++++++-
 pom.xml     | 24 ++++++++++++++++++++++++
 2 files changed, 59 insertions(+), 1 deletion(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index e05d54e..13307c9 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -25,6 +25,41 @@ pipeline {
         }
       }
     }
+    stage('JDK 17') {
+      agent {
+        label 'ubuntu'
+      }
+      tools {
+        jdk 'jdk_17_latest'
+        maven 'maven_3_latest'
+      }
+      environment {
+        MAVEN_OPTS = "-Xmx1024m"
+      }
+      stages {
+        stage('Build') {
+          steps {
+            sh 'mvn -B clean install -DskipTests -DskipAssembly'
+          }
+        }
+        stage('Test') {
+          steps {
+            sh 'mvn -B test'
+          }
+          post {
+            always {
+              junit(testResults: '**/surefire-reports/*.xml', 
allowEmptyResults: true)
+              junit(testResults: '**/failsafe-reports/*.xml', 
allowEmptyResults: true)
+            }
+          }
+        }
+      }
+      post {
+        always {
+          cleanWs deleteDirs: true, patterns: [[pattern: '**/target/**', type: 
'INCLUDE']]
+        }
+      }
+    }
     stage('JDK 11') {
       agent {
         label 'ubuntu'
@@ -45,7 +80,6 @@ pipeline {
         stage('Test') {
           steps {
             sh 'mvn -B test'
-            // step([$class: 'JiraIssueUpdater', issueSelector: [$class: 
'DefaultIssueSelector'], scm: scm])
           }
           post {
             always {
diff --git a/pom.xml b/pom.xml
index 2f6efd6..e5cdef8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -203,6 +203,30 @@
             </build>
         </profile>
         <profile>
+            <id>jdk17</id>
+            <activation>
+                <jdk>[17,)</jdk>
+            </activation>
+            <build>
+                <pluginManagement>
+                    <plugins>
+                        <plugin>
+                            <groupId>org.apache.maven.plugins</groupId>
+                            <artifactId>maven-surefire-plugin</artifactId>
+                            <configuration>
+                                <argLine>
+                                    --illegal-access=permit
+                                    --add-opens java.base/java.lang=ALL-UNNAMED
+                                    --add-opens java.base/java.util=ALL-UNNAMED
+                                    -Dillegal-access=permit
+                                </argLine>
+                            </configuration>
+                        </plugin>
+                    </plugins>
+                </pluginManagement>
+            </build>
+        </profile>
+        <profile>
             <id>travis-coveralls</id>
             <build>
                 <pluginManagement>

Reply via email to