[
https://issues.jboss.org/browse/JBASMP-59?page=com.atlassian.jira.plugin....
]
Cristian Milasan commented on JBASMP-59:
----------------------------------------
Hi James,
I need to point this again:
Executing CLI command WORKS: jboss-cli.bat --connect controller=localhost:9999
command="shutdown --host=myhost --restart=true" WORKS
Executing command from maven plugin with the execute-commands goat DO NOT WORK:
{noformat}
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>7.6.Final</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>execute-commands</goal>
</goals>
</execution>
</executions>
<configuration>
<hostname>127.0.0.1</hostname>
<username>admin</username>
<password>admin</password>
<executeCommands>
<commands>
<command>shutdown --host=myhost</command>
</commands>
</executeCommands>
</configuration>
</plugin>
{noformat}
Stack trace:
{noformat}
[ERROR] Failed to execute goal
org.jboss.as.plugins:jboss-as-maven-plugin:7.6.Final:execute-commands (default) on project
cre-ear: Execution default of goal
org.jboss.as.plugins:jboss-as-maven-plugin:7.6.Final:execute-commands failed: Command
execution failed for command 'shutdown --host=myhost'. Unsupported
ModelControllerClient implementation
org.jboss.as.plugin.cli.Commands$NonClosingModelControllerClient -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal
org.jboss.as.plugins:jboss-as-maven-plugin:7.6.Final:execute-commands (default) on project
cre-ear: Execution default of goal
org.jboss.as.plugins:jboss-as-maven-plugin:7.6.Final:execute-commands failed: Command
execution failed for command 'shutdown --host=myhost'. Unsupported
ModelControllerClient implementation
org.jboss.as.plugin.cli.Commands$NonClosingModelControllerClient
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal
org.jboss.as.plugins:jboss-as-maven-plugin:7.6.Final:execute-commands failed: Command
execution failed for command 'shutdown --host=myhost'. Unsupported
ModelControllerClient implementation
org.jboss.as.plugin.cli.Commands$NonClosingModelControllerClient
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.lang.IllegalArgumentException: Command execution failed for command
'shutdown --host=myhost'. Unsupported ModelControllerClient implementation
org.jboss.as.plugin.cli.Commands$NonClosingModelControllerClient
at org.jboss.as.plugin.cli.Commands.executeCommands(Commands.java:180)
at org.jboss.as.plugin.cli.Commands.execute(Commands.java:134)
at org.jboss.as.plugin.cli.ExecuteCommands.execute(ExecuteCommands.java:71)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
... 20 more
Caused by: org.jboss.as.cli.CommandLineException: Unsupported ModelControllerClient
implementation org.jboss.as.plugin.cli.Commands$NonClosingModelControllerClient
at org.jboss.as.cli.handlers.ShutdownHandler.doHandle(ShutdownHandler.java:97)
at
org.jboss.as.cli.handlers.CommandHandlerWithHelp.handle(CommandHandlerWithHelp.java:86)
at org.jboss.as.cli.impl.CommandContextImpl.handle(CommandContextImpl.java:581)
at org.jboss.as.plugin.cli.Commands.executeCommands(Commands.java:176)
... 23 more
[ERROR]
<noformat>
AM I missing something here?
Shutdown CLI handler fails due to different ModelControllerClient
being used
----------------------------------------------------------------------------
Key: JBASMP-59
URL:
https://issues.jboss.org/browse/JBASMP-59
Project: JBoss AS Maven Plugins
Issue Type: Bug
Reporter: James Perkins
Assignee: James Perkins
See
https://github.com/wildfly/wildfly/blob/7.2.0.Final-prerelease1/cli/src/m....
Likely just need the {{NonClosingModelControllerClient}} to extend the
{{CLIModelControllerClient}}.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)