1 Reply Latest reply on Feb 15, 2019 11:15 AM by quickbrownfox

    Wildfly 15 wildfly-maven-plugin problem

    quickbrownfox

      We're planning to migrate from Wildfly 8.2.1 to Wildfly 15. However, we're getting an error executing Wildfly Maven Plugin. It's complaining about an

      Unexpected element '{urn:jboss:cli:3.4}jboss-cli'

      and

      jboss-cli.xml: ParseError at [row,col]:[6,38]

      Here's the error:

      [ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:2.0.0.Final:execute-commands (default-cli) on project jboss-system-properties: Execution default-cli of goal org.wildfly.plugins:wildfly-maven-plugin:2.0.0.Final:execute-commands failed: Failed to initialize CLI context: Failed to parse C:\server\wildfly-15.0.1.Final\bin\jboss-cli.xml: ParseError at [row,col]:[6,38]

      [ERROR] Message: Unexpected element '{urn:jboss:cli:3.4}jboss-cli'

      [ERROR] -> [Help 1]

      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:2.0.0.Final:execute-commands (default-cli) on project jboss-system-properties: Execution default-cli of goal org.wildfly.plugins:wildfly-maven-plugin:2.0.0.Final:execute-commands failed: Failed to initialize CLI context

              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)

      ...

      Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.wildfly.plugins:wildfly-maven-plugin:2.0.0.Final:execute-commands failed: Failed to initialize CLI context

              ... 20 more

      Caused by: java.lang.IllegalStateException: Failed to initialize CLI context

              ... 21 more

      Caused by: org.jboss.as.cli.CliInitializationException: Failed to parse C:\server\wildfly-15.0.1.Final\bin\jboss-cli.xml

              ... 24 more

      Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[6,38]

      Message: Unexpected element '{urn:jboss:cli:3.4}jboss-cli'

              at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:120)

              at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:76)

              at org.jboss.as.cli.impl.CliConfigImpl.parse(CliConfigImpl.java:174)

              ... 29 more

      Here's our simple pom.xml:

       

      <?xml version="1.0" encoding="UTF-8"?>
      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <groupId>com.xyz.jboss.config.test</groupId>
        <artifactId>jboss-system-properties</artifactId>
        <version>0-SNAPSHOT</version>
        <name>jboss-system-properties</name>
        <url>http://maven.apache.org</url>

       

      <build>
      <plugins>
        <plugin>
             <groupId>org.wildfly.plugins</groupId>
             <artifactId>wildfly-maven-plugin</artifactId>
             <version>2.0.0.Final</version>
             <configuration>
                  <commands>
                       <command>/system-property=test-key:add(value=test-val)</command>
                  </commands>
             </configuration>
        </plugin>
      </plugins>

      </build>


      </project>

       

      Here's how we execute: mvn wildfly:execute-commands -X -e