public inbox for [email protected]
help / color / mirror / Atom feedFrom: Kartik Ohri <[email protected]>
To: Chapman Flack <[email protected]>
Cc: [email protected]
Subject: Re: PL/Java new build plugin
Date: Sat, 18 Jul 2020 22:54:56 +0530
Message-ID: <CAASLQ4MqSVnhK_GMgq03HcmOKk7a-v7b4L0yfPbtRO=mpqoQtA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAASLQ4Mva7dAXiS_c9OLhV4VzNHF=XNKJosuS5gtZTB6b4TW1Q@mail.gmail.com>
<CAASLQ4NFHYH1pfGJtCZDfdcxf_ZzLA+X+ko86vpyRDKVYr489Q@mail.gmail.com>
<[email protected]>
<CAASLQ4PDcaAJ8fEwXXFW6XPakc7GCNVgPNGCxA8KYMzPDZw4+w@mail.gmail.com>
<[email protected]>
<CAASLQ4OuFQCiSMeypQtfRaAvj-4H-EAgszLwdAo6Tc1zS9B66g@mail.gmail.com>
<[email protected]>
<CAASLQ4PSizkzBKyyfkp9ccJ1qDPLRLu6g2bo9cN-XuTzGQFGfQ@mail.gmail.com>
<CAASLQ4P9zGxHda=HAGJ2eAa-oMmJtnPm=4a14mj4P-QpfFsYxg@mail.gmail.com>
<[email protected]>
<CAASLQ4NmornyOW8n-qyneLpDVPgV0Js=+=Eys6bw3Y-ZiVbVjA@mail.gmail.com>
<CAASLQ4OYvTQL7ssG4=QyEqhaB71=AM-svBUYj3uRdWXWoQgBPw@mail.gmail.com>
<[email protected]>
<[email protected]>
<CAASLQ4N40xn-0S4Nsy0Ld75=Ny719MPUE7_aRP_5nAcAqkAqoQ@mail.gmail.com>
<CAASLQ4OiWCQQwYFnxAQBe2dC6Ms803RjCMX-9AC2=1m0ZzeDhA@mail.gmail.com>
<[email protected]>
<[email protected]>
I found this resource
http://blog.chalda.cz/2018/02/17/Maven-plugin-and-fight-with-classloading.html.
Using it I modified my mojo code to update the class loader. It didn't
work. I also used the ClassLoaderUtils referred in to view what resources
the class loader was loading.
This is the output from a standalone program where I call the script engine
to print the name of all script engines it can find. It is able to find
Oracle Nashorn.
[jdk.internal.loader.ClassLoaders$AppClassLoader@5bc2b487]
hashCode=1539486855
-> loader resource: null
-> loader resource element: file:/home/amcap1712/Desktop/
-> loader resource element:
jar:file:/usr/share/java/java-atk-wrapper.jar!/META-INF
[jdk.internal.loader.ClassLoaders$PlatformClassLoader@78308db1]
hashCode=2016447921
-> loader resource: null
-> loader resource element:
jar:file:/usr/share/java/java-atk-wrapper.jar!/META-INF
context class
loader=[jdk.internal.loader.ClassLoaders$AppClassLoader@5bc2b487]
hashCode=1539486855
This is the output from the mojo where it is not able to find any script
engine.
java.net.URLClassLoader@14840ffe] hashCode=344199166
-> loader resource: null
-> loader resource element:
jar:file:/usr/share/java/java-atk-wrapper.jar!/META-INF
-> loader resource element:
jar:file:/home/amcap1712/pljava/pljava-pgxs/target/pljava-pgxs-0.0.1-SNAPSHOT.jar!/META-INF
-> loader resource element:
jar:file:/home/amcap1712/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar!/META-INF
-> loader resource element:
jar:file:/home/amcap1712/Downloads/idea-IC-193.6911.18/plugins/maven/lib/maven3/boot/plexus-classworlds-2.6.0.jar!/META-INF
-> loader resource element:
jar:file:/home/amcap1712/Downloads/idea-IC-193.6911.18/lib/idea_rt.jar!/META-INF
[ClassRealm[plugin>org.postgresql:pljava-pgxs:0.0.1-SNAPSHOT, parent:
jdk.internal.loader.ClassLoaders$AppClassLoader@42a57993]]
hashCode=402683266
-> loader resource: null
-> loader resource element:
jar:file:/usr/share/java/java-atk-wrapper.jar!/META-INF
-> loader resource element:
jar:file:/home/amcap1712/pljava/pljava-pgxs/target/pljava-pgxs-0.0.1-SNAPSHOT.jar!/META-INF
-> loader resource element:
jar:file:/home/amcap1712/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar!/META-INF
-> loader resource element:
jar:file:/home/amcap1712/Downloads/idea-IC-193.6911.18/plugins/maven/lib/maven3/boot/plexus-classworlds-2.6.0.jar!/META-INF
-> loader resource element:
jar:file:/home/amcap1712/Downloads/idea-IC-193.6911.18/lib/idea_rt.jar!/META-INF
context class loader=[java.net.URLClassLoader@14840ffe] hashCode=344199166
What surprised me is that the only entry in the first case is present in
the second case but still the second fails, Am I missing something here ?
view thread (132+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: PL/Java new build plugin
In-Reply-To: <CAASLQ4MqSVnhK_GMgq03HcmOKk7a-v7b4L0yfPbtRO=mpqoQtA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox