From c20c754d7849ee3c0f23450bac89d74b1ac73ada Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Wed, 13 Mar 2019 09:47:02 +0100 Subject: [PATCH] Fail build when Illegal reflective access is detected (#8933) Motivation: We want to make the experience as smooth as possible for our users when using Java9+ and so should ensure we do not produce any 'Illegal reflective access' errors when using netty. Modifications: Add jvmArgs when running our tests that will deny reflective access and so will fail the build at the end due not be able to load some classes. Result: Ensure we do not produce any illegal refelctive access errors when using java9+ --- pom.xml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6a7518b619..c601eeb278 100644 --- a/pom.xml +++ b/pom.xml @@ -97,6 +97,9 @@ 12 + + + --illegal-access=deny ${argLine.java9.extras} true @@ -119,6 +122,9 @@ 11 + + + --illegal-access=deny ${argLine.java9.extras} true @@ -138,6 +144,9 @@ 10 + + + --illegal-access=deny --add-modules java.xml.bind ${argLine.java9.extras} true @@ -154,7 +163,7 @@ - --add-modules java.xml.bind ${argLine.java9.extras} + --illegal-access=deny --add-modules java.xml.bind ${argLine.java9.extras}