Wildfly 15 Wildfly-Maven-плагин - PullRequest
0 голосов
/ 14 февраля 2019

Мы планируем перейти с Wildfly 8.2.1 на Wildfly 15. Однако мы получаем ошибку при запуске плагина Wildfly Maven.Он жалуется на

неожиданный элемент '{urn: jboss: cli: 3.4} jboss-cli'

и

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

Вот ошибка:

[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

Вот наш простой 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>

Вот как мы выполняем: mvn wildfly:execute-commands -X -e

1 Ответ

0 голосов
/ 15 февраля 2019

Я смог обойти это.В <wildfly dir>\bin\jboss-cli.xml я уменьшил версию xmlns urn с 3.4 до версии 3.3:

<jboss-cli xmlns="urn:jboss:cli:3.3">
...