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+
This commit is contained in:
parent
5eb91d9ca1
commit
c20c754d78
11
pom.xml
11
pom.xml
@ -97,6 +97,9 @@
|
||||
<jdk>12</jdk>
|
||||
</activation>
|
||||
<properties>
|
||||
<argLine.java9.extras />
|
||||
<!-- Export some stuff which is used during our tests -->
|
||||
<argLine.java9>--illegal-access=deny ${argLine.java9.extras}</argLine.java9>
|
||||
<!-- Not use alpn agent as Java11 supports alpn out of the box -->
|
||||
<argLine.alpnAgent />
|
||||
<forbiddenapis.skip>true</forbiddenapis.skip>
|
||||
@ -119,6 +122,9 @@
|
||||
<jdk>11</jdk>
|
||||
</activation>
|
||||
<properties>
|
||||
<argLine.java9.extras />
|
||||
<!-- Export some stuff which is used during our tests -->
|
||||
<argLine.java9>--illegal-access=deny ${argLine.java9.extras}</argLine.java9>
|
||||
<!-- Not use alpn agent as Java11 supports alpn out of the box -->
|
||||
<argLine.alpnAgent />
|
||||
<forbiddenapis.skip>true</forbiddenapis.skip>
|
||||
@ -138,6 +144,9 @@
|
||||
<jdk>10</jdk>
|
||||
</activation>
|
||||
<properties>
|
||||
<argLine.java9.extras />
|
||||
<!-- Export some stuff which is used during our tests -->
|
||||
<argLine.java9>--illegal-access=deny --add-modules java.xml.bind ${argLine.java9.extras}</argLine.java9>
|
||||
<!-- Not use alpn agent as Java10 supports alpn out of the box -->
|
||||
<argLine.alpnAgent />
|
||||
<forbiddenapis.skip>true</forbiddenapis.skip>
|
||||
@ -154,7 +163,7 @@
|
||||
<properties>
|
||||
<argLine.java9.extras />
|
||||
<!-- Export some stuff which is used during our tests -->
|
||||
<argLine.java9>--add-modules java.xml.bind ${argLine.java9.extras}</argLine.java9>
|
||||
<argLine.java9>--illegal-access=deny --add-modules java.xml.bind ${argLine.java9.extras}</argLine.java9>
|
||||
<!-- Not use alpn agent as Java9 supports alpn out of the box -->
|
||||
<argLine.alpnAgent />
|
||||
<!-- Skip as maven plugin not works with Java9 yet -->
|
||||
|
Loading…
Reference in New Issue
Block a user