JMC-6115 Use Jemmy builds from Maven Central
Jie Kang
jkang at redhat.com
Fri Nov 9 21:09:26 UTC 2018
Hello Marcus,
I've made attempts to treat the Jemmy libraries like the third party
dependencies such as javamail and owasp encoder through the local p2
site. However I've ran into the OSGi split package issue as the Jemmy
project has packages of the same full name (e.g. org.jemmy.input) with
different classes, packaged into different jars. This results in
compile time errors like:
Access restriction: The type 'SelectionText' is not API (restriction
on classpath entry '[...]/org.adoptopenjdk.jemmy-core-1.0.2.jar') /*
SelectionText is under a package name that is exported in two
different jemmy jars and the compiler only picks one of them. There
are classes in the package the compiler did pick that are also needed
too */
These restriction errors can be ignored but without further
modification it results in CNFE at runtime, which I believe was seen
for the very initial proposed patch (e.g. CFNE for
o.j.image.ImageComparator as o.j.image package is selected to come
from bundle o.j.awt-input, but that class is in bundle o.j.core). One
could bundle the Jemmy classes directly into the JMC Jemmy Test bundle
but then the only difference is when it is downloaded, via p2:site or
automatically during process-resources phase when uitests are run.
For sticking to p2, I would probably be investigating making quite
customized MANIFEST.MF files for the Jemmy bundles (currently using
the default generated by bnd plugin) and the split package directive
or sending a patch to the Jemmy project to provide an all-in-one jar.
Thoughts?
Regards,
On Thu, Nov 1, 2018 at 11:45 AM Marcus Hirt <marcus.hirt at oracle.com> wrote:
>
> Thank you Jie,
>
> I think this is a definite improvement, though I was hoping we would be able to
> treat the Jemmy libraries like another third party dependency. Guru, could you
> review this, and sponsor the change if you agree with the solution?
>
> Kind regards,
> Marcus
>
> On 2018-11-01, 07:56, "jmc-dev on behalf of Jie Kang" <jmc-dev-bounces at openjdk.java.net on behalf of jkang at redhat.com> wrote:
>
> On Mon, Oct 15, 2018 at 9:07 AM Jie Kang <jkang at redhat.com> wrote:
> >
> > On Sat, Oct 13, 2018 at 12:48 PM Patrick Reinhart <patrick at reini.net> wrote:
> > >
> > > Hi Jie,
> > >
> > > For me the tests do not run here under Linux:
> > >
> > > mvn verify -P uitests
> > >
> > > [INFO]
> > > ------------------------------------------------------------------------
> > > [INFO] Reactor Summary:
> > > [INFO]
> > > [INFO] JDK Mission Control 7.0.0-SNAPSHOT ................. SUCCESS [
> > > 2.095 s]
> > > [INFO] missioncontrol.application ......................... SUCCESS [
> > > 0.059 s]
> > > [INFO] org.openjdk.jmc.ui.common .......................... SUCCESS [
> > > 6.941 s]
> > > [INFO] org.openjdk.jmc.commands ........................... SUCCESS [
> > > 4.492 s]
> > > [INFO] org.openjdk.jmc.ui ................................. SUCCESS [
> > > 14.612 s]
> > > [INFO] org.openjdk.jmc.greychart .......................... SUCCESS [
> > > 7.724 s]
> > > [INFO] org.openjdk.jmc.greychart.ui ....................... SUCCESS [
> > > 6.848 s]
> > > [INFO] org.openjdk.jmc.rjmx ............................... SUCCESS [
> > > 10.093 s]
> > > [INFO] org.openjdk.jmc.rjmx.ui ............................ SUCCESS [
> > > 9.516 s]
> > > [INFO] org.openjdk.jmc.alert .............................. SUCCESS [
> > > 5.107 s]
> > > [INFO] org.openjdk.jmc.attach ............................. SUCCESS [
> > > 2.444 s]
> > > [INFO] org.openjdk.jmc.browser.attach ..................... FAILURE [
> > > 4.726 s]
> > >
> > > Also the UI tests fail:
> > >
> > > mvn verify -P uitests
> >
> > The logs below has the same failure as the logs above; was this the
> > intended paste?
> >
> > `org.openjdk.jmc.browser.attach` is under `application` module, is not
> > a UI test and has no dependence on the Jemmy libraries as far as I can
> > tell. The patch adds a new phase to the `org.openjdk.jmc.test.jemmy`
> > module that downloads Jemmy libraries under the lib folder; assuming
> > your logs are complete this module has not been reached and so I can't
> > see how this failure is related. Can you share logs of the actual
> > failure? Otherwise possibly retry with a clean run via 'mvn clean
> > verify -P uitests'.
>
> Hi,
>
> Is there any update on this?
>
> I've attached the patch again to this e-mail; this was the initial e-mail:
>
> > Please find attached an alternative patch that addresses JMC-6115. It
> > adds a step in the maven phase to download the Jemmy libraries from
> > Maven Central. The pom file is also converted to all tabs. Let me know
> > what you think!
>
> Regards,
>
> >
> >
> > Regards,
> >
> > >
> > > [INFO]
> > > ------------------------------------------------------------------------
> > > [INFO] Reactor Summary:
> > > [INFO]
> > > [INFO] JDK Mission Control 7.0.0-SNAPSHOT ................. SUCCESS [
> > > 1.867 s]
> > > [INFO] missioncontrol.application ......................... SUCCESS [
> > > 0.061 s]
> > > [INFO] org.openjdk.jmc.ui.common .......................... SUCCESS [
> > > 5.843 s]
> > > [INFO] org.openjdk.jmc.commands ........................... SUCCESS [
> > > 4.192 s]
> > > [INFO] org.openjdk.jmc.ui ................................. SUCCESS [
> > > 12.285 s]
> > > [INFO] org.openjdk.jmc.greychart .......................... SUCCESS [
> > > 5.707 s]
> > > [INFO] org.openjdk.jmc.greychart.ui ....................... SUCCESS [
> > > 6.156 s]
> > > [INFO] org.openjdk.jmc.rjmx ............................... SUCCESS [
> > > 9.170 s]
> > > [INFO] org.openjdk.jmc.rjmx.ui ............................ SUCCESS [
> > > 9.860 s]
> > > [INFO] org.openjdk.jmc.alert .............................. SUCCESS [
> > > 4.523 s]
> > > [INFO] org.openjdk.jmc.attach ............................. SUCCESS [
> > > 1.856 s]
> > > [INFO] org.openjdk.jmc.browser.attach ..................... FAILURE [
> > > 3.777 s]
> > >
> > > -Patrick
> > >
> > >
> > >
>
>
>
>
More information about the jmc-dev
mailing list