From dev-return-127053-archive-asf-public=cust-asf.ponee.io@maven.apache.org Thu Nov 15 08:02:10 2018 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 1D13D180669 for ; Thu, 15 Nov 2018 08:02:09 +0100 (CET) Received: (qmail 52667 invoked by uid 500); 15 Nov 2018 07:02:08 -0000 Mailing-List: contact dev-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Developers List" Reply-To: "Maven Developers List" Delivered-To: mailing list dev@maven.apache.org Received: (qmail 52654 invoked by uid 99); 15 Nov 2018 07:02:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Nov 2018 07:02:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id B8D5D180E1B for ; Thu, 15 Nov 2018 07:02:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.849 X-Spam-Level: X-Spam-Status: No, score=0.849 tagged_above=-999 required=6.31 tests=[DKIMWL_WL_MED=-1.452, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=2, KAM_NUMSUBJECT=0.5, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id KPqq_5WfZh4S for ; Thu, 15 Nov 2018 07:02:05 +0000 (UTC) Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com [209.85.210.49]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 55F585F64B for ; Thu, 15 Nov 2018 07:02:05 +0000 (UTC) Received: by mail-ot1-f49.google.com with SMTP id k98so17175869otk.3 for ; Wed, 14 Nov 2018 23:02:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=sbeZ0ZnU2S/YEmXHpGaPnr/X6la7ABK+6wzQLuemODM=; b=lf5GJ8SBKDRNM5tTRbGt2AueuIXksABi+eG2iIiWcYaH0dsfNeMOi7cGluWwFmM2aD 8Gn5oguWG96cLbFXaUKOt4HYHpJ3fWlUplgi4MC0wjzz9+C7GChCB8eftHqNJ+TJUVDZ 6RihG6k9Lb4DuJAqhKfkXwnRllbLooSJD8IAIAm6OmIMVEaSdTxIDrT4bhCNTNMFky2c fmsjztA9yB22OBbPH5BARNNv8nDKUAoSmqgz9N2+1G5uSs8u+xuvnLEllJvpTb9/oJqL fgmmrrS2pSiHjcsLnGAiMwQF0GrGamDascdt9YYaROxNz6WX69DJEhAFWxKKW9qXfogH ymvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=sbeZ0ZnU2S/YEmXHpGaPnr/X6la7ABK+6wzQLuemODM=; b=bVRAS+2URIy10BQOt6Mvm2JXa2Px37rMdyDrLHiyXnr754ke+GrMf6Rgj+19sKDbth o3ndGTQfzJ6T6S7RboNfTevYXV1RdPZZ7YOgllmmMXPme9zq6AGVexyQ+OwGu9oYGE2s T9e9m5pGGvTLbhz3Nadj+tFHlkvom3FmheWM7OZNxFeY3x43S+P2e2fHg7co/EizxT+B hQXBC+y0Cz9FLdV3uwM75WyIT9tikhYvWIYrlgfDlm6dfvroG+OvwX3GeUwspSv7Z8Wo 9tZL6nsEPgHbAxbKs9UxY/cWlfsp459pzjZMC5P9iUxMIXCn1h9vF/vaxolBYAFYhQWe K1ng== X-Gm-Message-State: AGRZ1gJIEZmWvxse0aSYmSRSeIschTbu6CBlXlv40330qW7KnkaLHRvl bXBcpLy70QGf3etYd7odddsswfsjXMhshav74gPq1w== X-Google-Smtp-Source: AJdET5eXYhDl/p90ICuyakY2SXrkEozvGNb2mlS2uOozWoPnRcpr/suXVmSfkBJW973+7v3e6I3AhGoH8SK0bT5Zsnc= X-Received: by 2002:a9d:4d01:: with SMTP id n1mr2799535otf.212.1542265323736; Wed, 14 Nov 2018 23:02:03 -0800 (PST) MIME-Version: 1.0 References: <751c093e-5862-bac5-b875-d2dcd0ce8062@adangel.org> In-Reply-To: <751c093e-5862-bac5-b875-d2dcd0ce8062@adangel.org> From: Romain Manni-Bucau Date: Thu, 15 Nov 2018 08:01:52 +0100 Message-ID: Subject: Re: maven and java11 To: Maven Developers List Content-Type: multipart/alternative; boundary="000000000000c55384057aaea0ae" --000000000000c55384057aaea0ae Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable @Andreas: no, the bug is in plexus as explained before, jaxb is provided but plexus classloader is not java11 compatible @Herv=C3=A9: i'll try to send a PR on plexus soon, will probably be faster = than mail exchanges ;) Romain Manni-Bucau @rmannibucau | Blog | Old Blog | Github | LinkedIn | Book Le jeu. 15 nov. 2018 =C3=A0 07:56, Andreas Dangel a =C3=A9crit : > The problem is maybe, that JAXB has been removed with java11: [1] > > The reference implementation [2] can be used as a replacement. > > > Regards, > > Andreas > > > 1: https://openjdk.java.net/jeps/320 > > 2: > > https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.sun.xml.bind%22%20= AND%20a%3A%22jaxb-ri%22 > > > Am 14.11.2018 um 16:34 schrieb Romain Manni-Bucau: > > assume i have a standard package-info.json with @XmlSchema, nothing cra= zy > > in jaxb land. > > > > jaxb will do a loadClass(module, "com.foo.mypackage.package-info"), thi= s > > will call findClass(String /*module.getName()*/, String) which will cal= l > > findClass(String) (default impl in ClassLoader parent class of any > > classloader impl). > > > > ClassRealm will expect findClass(String) to be loaded from > > loadClass(String[,boolean]) so always throws ClassNotFoundException sin= ce > > it is not expected to be used (instead the lookup strategy - API - is > > used). > > > > So in the previous cases of jaxb the loadClass will throw a ClassNotFou= nd > > which makes the metadata just wrong. > > > > This is a vicious bug which means not a single mojo can use the java 11 > > classloader API. By itself it sounds ok but since a lot of libs are > > starting to use it, it means mojo are not working under java 11 until t= he > > mojo creates another classloader which is not the case for standard > simple > > tasks mojos. > > > > Romain Manni-Bucau > > @rmannibucau | Blog > > | Old Blog > > | Github < > https://github.com/rmannibucau> | > > LinkedIn | Book > > < > https://www.packtpub.com/application-development/java-ee-8-high-performan= ce > > > > > > > > Le mer. 14 nov. 2018 =C3=A0 10:00, Tibor Digana a > > =C3=A9crit : > > > >> Hi Romain, > >> > >> Which class could not be loaded? > >> JAXB or CDI class? > >> Some class from Maven dist or another one? > >> > >> BR, > >> Tibor > >> > >> On Tue, Nov 13, 2018 at 5:35 PM Romain Manni-Bucau < > rmannibucau@gmail.com> > >> wrote: > >> > >>> Hi guys, > >>> > >>> did you plan to fix and upgrade classworlds to support java11? > >>> > >>> The trick is in > >> org.codehaus.plexus.classworlds.realm.ClassRealm#findClass. > >>> This method assumes it can't be called outside > >> loadClass(String[,boolean]) > >>> but in j11 there is loadClass(String, String) defaulting to it as wel= l > so > >>> it just fails and breaks a lot of mojo. One lib using that feature is > >> jaxb > >>>> =3D 2.3.0 so any mojo relying on jaxb 2.3 is broken. > >>> Romain Manni-Bucau > >>> @rmannibucau | Blog > >>> | Old Blog > >>> | Github < > >>> https://github.com/rmannibucau> | > >>> LinkedIn | Book > >>> < > >>> > >> > https://www.packtpub.com/application-development/java-ee-8-high-performan= ce > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org > For additional commands, e-mail: dev-help@maven.apache.org > > --000000000000c55384057aaea0ae--