From 047cae8edc156a304e14250026c2ce220567da8b 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 eb3c6a7ada..8178cd08a3 100644 --- a/pom.xml +++ b/pom.xml @@ -94,6 +94,9 @@ 12 + + + --illegal-access=deny ${argLine.java9.extras} true @@ -113,6 +116,9 @@ 11 + + + --illegal-access=deny ${argLine.java9.extras} true @@ -132,6 +138,9 @@ 10 + + + --illegal-access=deny --add-modules java.xml.bind ${argLine.java9.extras} true @@ -148,7 +157,7 @@ - --add-modules java.xml.bind ${argLine.java9.extras} + --illegal-access=deny --add-modules java.xml.bind ${argLine.java9.extras}