-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
3.0.0.Final, 4.2.0.Final
-
None
Adding the sping framework as module over CLI to the Wildfly server isn't possible anymore starting with plugin version 3.0.0. Using 2.0.2 Final the command execution works as expected and adds the module.
Executing this by using jboss-cli.bat works also without exception. Testing with Wildfly 17 and 23 ends with the same result.
Maven snippet (for using on windows OS replace ":" by ";" in command:
<execution>
<id>add-spring-module</id>
<phase>install</phase>
<goals>
<goal>execute-commands</goal>
</goals>
<configuration>
<jbossHome>${project.build.directory}/server</jbossHome>
<commands>
<command>module add name=org.springframework.spring --resources=${project.build.directory}${file.separator}lib${file.separator}spring-beans${version.spring}.jar:${project.build.directory}${file.separator}lib${file.separator}spring-core${version.spring}.jar:${project.build.directory}${file.separator}lib${file.separator}spring-aop-${version.spring}.jar:${project.build.directory}${file.separator}lib${file.separator}spring-context-${version.spring}.jar:${project.build.directory}${file.separator}lib${file.separator}spring-web-${version.spring}.jar:${project.build.directory}${file.separator}lib${file.separator}spring-expression-${version.spring}.jar --dependencies=javax.api,javax.el.api,javax.faces.api,org.apache.commons.logging,org.jboss.vfs</command>
</commands>
</configuration>
</execution>
Exception:
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:3.0.0.Final:execute-commands (add-spring-module) on project deploy-wildfly: null: MojoExecutionException: InvocationTargetException: java.util.concurrent.ExecutionException: java.lang.IllegalAccessError: failed to access class org.jboss.staxmapper.FormattingXMLStreamWriter from class org.jboss.as.cli.handlers.module.ASModuleHandler (org.jboss.staxmapper.FormattingXMLStreamWriter is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @36aab105; org.jboss.as.cli.handlers.module.ASModuleHandler is in unnamed module of loader java.net.URLClassLoader @22865072) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:3.0.0.Final:execute-commands (add-spring-module) on project deploy-wildfly: null
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:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
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
at org.wildfly.plugin.cli.CommandExecutor.execute (CommandExecutor.java:74)
at org.wildfly.plugin.cli.ExecuteCommandsMojo.execute (ExecuteCommandsMojo.java:242)
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:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
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.reflect.InvocationTargetException
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.wildfly.plugin.cli.CLIWrapper.handle (CLIWrapper.java:73)
at org.wildfly.plugin.cli.LocalCLIExecutor.handle (LocalCLIExecutor.java:111)
at org.wildfly.plugin.cli.LocalCLIExecutor.executeCommands (LocalCLIExecutor.java:103)
at org.wildfly.plugin.cli.CommandExecutor.executeInProcess (CommandExecutor.java:130)
at org.wildfly.plugin.cli.CommandExecutor.execute (CommandExecutor.java:72)
at org.wildfly.plugin.cli.ExecuteCommandsMojo.execute (ExecuteCommandsMojo.java:242)
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:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
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.jboss.as.cli.CommandLineException: java.util.concurrent.ExecutionException: java.lang.IllegalAccessError: failed to access class org.jboss.staxmapper.FormattingXMLStreamWriter from class org.jboss.as.cli.handlers.module.ASModuleHandler (org.jboss.staxmapper.FormattingXMLStreamWriter is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @36aab105; org.jboss.as.cli.handlers.module.ASModuleHandler is in unnamed module of loader java.net.URLClassLoader @22865072)
at org.jboss.as.cli.impl.CommandContextImpl.execute (CommandContextImpl.java:943)
at org.jboss.as.cli.impl.CommandContextImpl.handleLegacyCommand (CommandContextImpl.java:1941)
at org.jboss.as.cli.impl.CommandContextImpl.handle (CommandContextImpl.java:880)
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.wildfly.plugin.cli.CLIWrapper.handle (CLIWrapper.java:73)
at org.wildfly.plugin.cli.LocalCLIExecutor.handle (LocalCLIExecutor.java:111)
at org.wildfly.plugin.cli.LocalCLIExecutor.executeCommands (LocalCLIExecutor.java:103)
at org.wildfly.plugin.cli.CommandExecutor.executeInProcess (CommandExecutor.java:130)
at org.wildfly.plugin.cli.CommandExecutor.execute (CommandExecutor.java:72)
at org.wildfly.plugin.cli.ExecuteCommandsMojo.execute (ExecuteCommandsMojo.java:242)
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:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
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.util.concurrent.ExecutionException: java.lang.IllegalAccessError: failed to access class org.jboss.staxmapper.FormattingXMLStreamWriter from class org.jboss.as.cli.handlers.module.ASModuleHandler (org.jboss.staxmapper.FormattingXMLStreamWriter is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @36aab105; org.jboss.as.cli.handlers.module.ASModuleHandler is in unnamed module of loader java.net.URLClassLoader @22865072)
at java.util.concurrent.FutureTask.report (FutureTask.java:122)
at java.util.concurrent.FutureTask.get (FutureTask.java:191)
at org.jboss.as.cli.impl.CommandExecutor.execute (CommandExecutor.java:732)
at org.jboss.as.cli.impl.CommandExecutor.execute (CommandExecutor.java:713)
at org.jboss.as.cli.impl.CommandContextImpl.lambda$handleLegacyCommand$4 (CommandContextImpl.java:1942)
at org.jboss.as.cli.impl.CommandContextImpl.execute (CommandContextImpl.java:930)
at org.jboss.as.cli.impl.CommandContextImpl.handleLegacyCommand (CommandContextImpl.java:1941)
at org.jboss.as.cli.impl.CommandContextImpl.handle (CommandContextImpl.java:880)
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.wildfly.plugin.cli.CLIWrapper.handle (CLIWrapper.java:73)
at org.wildfly.plugin.cli.LocalCLIExecutor.handle (LocalCLIExecutor.java:111)
at org.wildfly.plugin.cli.LocalCLIExecutor.executeCommands (LocalCLIExecutor.java:103)
at org.wildfly.plugin.cli.CommandExecutor.executeInProcess (CommandExecutor.java:130)
at org.wildfly.plugin.cli.CommandExecutor.execute (CommandExecutor.java:72)
at org.wildfly.plugin.cli.ExecuteCommandsMojo.execute (ExecuteCommandsMojo.java:242)
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:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
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.IllegalAccessError: failed to access class org.jboss.staxmapper.FormattingXMLStreamWriter from class org.jboss.as.cli.handlers.module.ASModuleHandler (org.jboss.staxmapper.FormattingXMLStreamWriter is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @36aab105; org.jboss.as.cli.handlers.module.ASModuleHandler is in unnamed module of loader java.net.URLClassLoader @22865072)
at org.jboss.as.cli.handlers.module.ASModuleHandler.create (ASModuleHandler.java:583)
at org.jboss.as.cli.handlers.module.ASModuleHandler.addModule (ASModuleHandler.java:493)
at org.jboss.as.cli.handlers.module.ASModuleHandler.doHandle (ASModuleHandler.java:346)
at org.jboss.as.cli.handlers.CommandHandlerWithHelp.handle (CommandHandlerWithHelp.java:89)
at org.jboss.as.cli.impl.CommandExecutor$2.lambda$build$0 (CommandExecutor.java:704)
at org.jboss.as.cli.impl.CommandExecutor.lambda$execute$0 (CommandExecutor.java:727)
at java.util.concurrent.FutureTask.run (FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
at java.lang.Thread.run (Thread.java:834)