You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "jaikiran pai (JIRA)" <ji...@apache.org> on 2018/03/17 09:30:00 UTC

[jira] [Resolved] (IVY-1569) Illegal access warnings with Java 9

     [ https://issues.apache.org/jira/browse/IVY-1569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

jaikiran pai resolved IVY-1569.
-------------------------------
       Resolution: Fixed
         Assignee: Gintas Grigelionis  (was: jaikiran pai)
    Fix Version/s: master

The code in IvyAuthenticator has now been changed to not use reflection when running in a Java 9+ runtime. Java 9+ runtime exposes a `Authenticator#getDefault()` which is what we use now in that runtime.

> Illegal access warnings with Java 9
> -----------------------------------
>
>                 Key: IVY-1569
>                 URL: https://issues.apache.org/jira/browse/IVY-1569
>             Project: Ivy
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.3.0, 2.4.0
>         Environment: Java 9.0.1
>            Reporter: Wouter van Reeven
>            Assignee: Gintas Grigelionis
>            Priority: Major
>             Fix For: master
>
>
> When doing an ant ivy:resolve with Java 9, an illegal access warning is logged:
> resolve:
> [ivy:retrieve] :: Apache Ivy 2.3.0 - 20130110142753 :: http://ant.apache.org/ivy/ ::
> [ivy:retrieve] :: loading settings :: file = common/conf/ivysettings.xml
> [ivy:retrieve] :: resolving dependencies :: XXXX
> [ivy:retrieve] 	confs: [compile, runtime, ext]
> WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access by org.apache.ivy.util.url.IvyAuthenticator (file:common/lib/ivy-2.3.0.jar) to field java.net.Authenticator.theAuthenticator
> WARNING: Please consider reporting this to the maintainers of org.apache.ivy.util.url.IvyAuthenticator
> WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
> WARNING: All illegal access operations will be denied in a future release
> There is a workaround which is to use --add-opens command line options to the invocation of java but unfortunately this cannot be done when using ivy in Ant. Please revise the code and fix this . Many thanks in advance!



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)