From issues-return-147644-archive-asf-public=cust-asf.ponee.io@maven.apache.org Thu Apr 4 23:14:08 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 4E68E1807A1 for ; Fri, 5 Apr 2019 01:14:07 +0200 (CEST) Received: (qmail 46112 invoked by uid 500); 4 Apr 2019 23:14:04 -0000 Mailing-List: contact issues-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list issues@maven.apache.org Received: (qmail 45880 invoked by uid 99); 4 Apr 2019 23:14:04 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Apr 2019 23:14:04 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 51D6EE29CE for ; Thu, 4 Apr 2019 23:14:03 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 5344A24652 for ; Thu, 4 Apr 2019 23:14:02 +0000 (UTC) Date: Thu, 4 Apr 2019 23:14:02 +0000 (UTC) From: "Hudson (JIRA)" To: issues@maven.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MNG-6506) Mojos are unable to load package annotations on Java >= 9 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MNG-6506?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D168103= 93#comment-16810393 ]=20 Hudson commented on MNG-6506: ----------------------------- Build unstable in Jenkins: Maven TLP =C2=BB maven =C2=BB MNG-6169/MNG-6556 = #12 See https://builds.apache.org/job/maven-box/job/maven/job/MNG-6169%252FMNG-= 6556/12/ > Mojos are unable to load package annotations on Java >=3D 9 > --------------------------------------------------------- > > Key: MNG-6506 > URL: https://issues.apache.org/jira/browse/MNG-6506 > Project: Maven > Issue Type: Bug > Components: Class Loading > Affects Versions: 3.6.0 > Reporter: Andreas Veithen > Assignee: Sylwester Lachiewicz > Priority: Major > Labels: up-for-grabs > Fix For: 3.6.1 > > Time Spent: 20m > Remaining Estimate: 0h > > On Java 9 and above, calls to {{java.lang.Package.getAnnotation(Class)}} = from within a Mojo always return {{null}} (unless the {{package-info}} clas= s has been loaded by some other means before). > The reason appears to be an incompatibility between Java 9 and Plexus Cla= ssworlds: > * Java 9 ultimately calls {{findClass}} (instead of {{loadClass}}) to get= the {{package-info}} class. > * The {{findClass}} implementation in {{ClassRealm}} always throws {{Clas= sNotFoundException}}: https://github.com/codehaus-plexus/plexus-classworlds= /blob/master/src/main/java/org/codehaus/plexus/classworlds/realm/ClassRealm= .java#L275. > This in particular affects plugins that interact with the JAXB API becaus= e it relies on package annotations. > A workaround is to preload the required {{package-info}} classes using {{= loadClass}}; see e.g. http://svn.apache.org/viewvc?rev=3D1845026&view=3Drev= . -- This message was sent by Atlassian JIRA (v7.6.3#76005)