Compiling custom plugin with jdk11 requires ASM7
kristina.gocheva@...
Hi everyone, I am trying to compile a custom built plugin that has the following maven parent using open-jdk11: <parent> Currently, I hit the following issue:
[INFO]
[INFO] --- gate-maven-plugin:9.0.1:DumpCreoleToXML (default) @ mate ---
[INFO] CREOLE plugin loaded: creole
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 48.792 s
[INFO] Finished at: 2023-01-23T09:34:42+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal uk.ac.gate:gate-maven-plugin:9.0.1:DumpCreoleToXML (default) on project mate: error expanding creole: NestHost requires ASM7 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
Do you have any recommendations how to resolve this? |
|
Mark Greenwood
I'm not entirely sure exactly what's causing that error. We were using a shaded copy of ASM 9.0 until recently when I upgraded that to 9.4 to allow plugins to be built with JDK17. Can you try using the most recent snapshot build which should be 9.1-SNAPSHOT of gate-plugin-base and see if that solves the problem? Mark
On 23/01/2023 08:53,
kristina.gocheva@... wrote:
|
|
kristina.gocheva@...
I fail to find such version of the plugin. Could you send me a download link? Thanks.
Regards,
Kristina Gocheva
Developer at Ontotext |
|
Mark Greenwood
You can either checkout gate-top and build it locally or you can get if from our maven repo at https://repo.gate.ac.uk/content/groups/public (so you should be able to include that repo in your pom.xml so it gets pulled automatically). Mark On 23/01/2023 10:38,
kristina.gocheva@... wrote:
|
|
Ian Roberts
You will need to include the GATE Maven
repository in either your project pom or an active profile of your
settings.xml:
<repositories>
<repository> <id>gate.ac.uk</id> <name>GATE Development Repository</name> <url>https://repo.gate.ac.uk/content/groups/public/</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>gate.ac.uk</id> <name>GATE Development Repository</name> <url>https://repo.gate.ac.uk/content/groups/public/</url> </pluginRepository> </pluginRepositories> Ian
On 23/01/2023 10:38,
kristina.gocheva@... wrote:
-- Ian Roberts | Department of Computer Science i.roberts@... | University of Sheffield, UK |
|
kristina.gocheva@...
Thanks, I was able to successfully pull the snapshot you recommended. However, the error still persist. I am adding the stacktrace this time: [INFO] CREOLE plugin loaded: creole
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.548 s
[INFO] Finished at: 2023-01-23T14:17:07+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal uk.ac.gate:gate-maven-plugin:9.1-SNAPSHOT:DumpCreoleToXML (default) on project mate: error expanding creole: NestHost requires ASM7 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal uk.ac.gate:gate-maven-plugin:9.1-SNAPSHOT:DumpCreoleToXML (default) on project mate: error expanding creole
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: error expanding creole
at uk.ac.gate.maven.DumpCreoleToXML.execute (DumpCreoleToXML.java:173)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.lang.UnsupportedOperationException: NestHost requires ASM7
at gate.util.asm.ClassVisitor.visitNestHost (ClassVisitor.java:174)
at gate.util.asm.ClassReader.accept (ClassReader.java:586)
at gate.util.asm.ClassReader.accept (ClassReader.java:424)
at uk.ac.gate.maven.DumpCreoleToXML$TargetPlugin.scanDir (DumpCreoleToXML.java:287)
at uk.ac.gate.maven.DumpCreoleToXML$TargetPlugin.scanDir (DumpCreoleToXML.java:276)
at uk.ac.gate.maven.DumpCreoleToXML$TargetPlugin.scanDir (DumpCreoleToXML.java:276)
at uk.ac.gate.maven.DumpCreoleToXML$TargetPlugin.scanDir (DumpCreoleToXML.java:276)
at uk.ac.gate.maven.DumpCreoleToXML$TargetPlugin.scanDir (DumpCreoleToXML.java:276)
at uk.ac.gate.maven.DumpCreoleToXML$TargetPlugin.scanDir (DumpCreoleToXML.java:276)
at uk.ac.gate.maven.DumpCreoleToXML$TargetPlugin.getCreoleXML (DumpCreoleToXML.java:234)
at uk.ac.gate.maven.DumpCreoleToXML.execute (DumpCreoleToXML.java:131)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I should perhaps add that in pom.xml of custom plugin we have property <java.version>11</java.version> which might be causing the issue. When this is set to 1.8 instead of 11 the behavior differs. Regards,
Kristina Gocheva |
|
Ian Roberts
I see what the issue is and I'm
tracking it as https://github.com/GateNLP/gate-core/issues/160.
Ian
On 23/01/2023 12:42,
kristina.gocheva@... wrote:
-- Ian Roberts | Department of Computer Science i.roberts@... | University of Sheffield, UK |
|
Ian Roberts
This should now be fixed in the latest
9.1-SNAPSHOT of gate-core.
Ian
On 23/01/2023 13:00, Ian Roberts wrote:
-- Ian Roberts | Department of Computer Science i.roberts@... | University of Sheffield, UK |
|
Thanks! We'll definitely test that. However using the SNAPSHOT is not stable and recommended for production code. When do you plan a new gate version release that would include the code change?
Kind regards, |
|
Ian Roberts
We don't have a fixed target date just
yet but I expect we'll do a release towards the end of May or
early June.
Ian
On 21/03/2023 09:54,
kristina.gocheva@... wrote:
Thanks! We'll definitely test that. However using the SNAPSHOT is not stable and recommended for production code. When do you plan a new gate version release that would include the code change?
-- Ian Roberts | Department of Computer Science i.roberts@... | University of Sheffield, UK |
|
kristina.gocheva@...
Ok thanks,
We will be expecting this. Ontotext |
|