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/commons-ognl.git


The following commit(s) were added to refs/heads/master by this push:
     new c4f0df8  Adds dedicated profile for Java 17
c4f0df8 is described below

commit c4f0df8437b9f29c9b89ae38225d5989787f6755
Author: Lukasz Lenart <lukaszlen...@apache.org>
AuthorDate: Mon Oct 18 08:12:44 2021 +0200

    Adds dedicated profile for Java 17
---
 .github/workflows/maven.yml |  8 ++------
 pom.xml                     | 23 +++++++++++++++++++++++
 2 files changed, 25 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 9f79aae..f41f631 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -22,11 +22,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        java: [ 8, 11 ]
-        additionalArg: ['']
-        include:
-          - java: 17
-            additionalArg: --add-opens java.base/java.lang=ALL-UNNAMED
+        java: [ 8, 11, 17 ]
     steps:
     - uses: actions/checkout@v2.3.5
     - name: Set up JDK ${{ matrix.java }}
@@ -36,4 +32,4 @@ jobs:
         java-version: ${{ matrix.java }}
         cache: 'maven'
     - name: Build with Maven on Java ${{ matrix.java }}
-      run: mvn -V -Ddoclint=all --file pom.xml --no-transfer-progress ${{ 
matrix.additionalArg }}
+      run: mvn -V -Ddoclint=all --file pom.xml --no-transfer-progress
diff --git a/pom.xml b/pom.xml
index 4ac81b2..1d598cd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -607,5 +607,28 @@ limitations under the License.
         </pluginManagement>
       </build>
     </profile>
+
+    <profile>
+      <id>jdk17</id>
+      <activation>
+        <jdk>[17,)</jdk>
+      </activation>
+      <build>
+        <pluginManagement>
+          <plugins>
+            <plugin>
+              <groupId>org.apache.maven.surefire</groupId>
+              <artifactId>surefire-junit4</artifactId>
+              <configuration>
+                <argLine>--illegal-access=permit</argLine>
+                <argLine>--add-opens java.base/java.lang=ALL-UNNAMED</argLine>
+                <argLine>--add-opens 
jdk.management/com.sun.management.internal=ALL-UNNAMED</argLine>
+                <argLine>-Dillegal-access=permit</argLine>
+              </configuration>
+            </plugin>
+          </plugins>
+        </pluginManagement>
+      </build>
+    </profile>
   </profiles>
 </project>

Reply via email to