HTTPS を使用するように Wildfly 管理コンソールを保護し、https 経由でデプロイするように pom.xml を構成すると、奇妙な動作が発生します。(バージョン 8.2.1 と 10.1.0、スタンドアロン モードで試しました)。
正常に (再) デプロイできるのは 1 回だけです。その後、以下のエラーが発生し、サーバーを再起動して再度 (再) デプロイする必要があります。
pom.xml の変更:
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>1.0.2.Final</version>
<configuration>
<protocol>https-remoting</protocol>
<port>9993</port>
</configuration>
</plugin>
私のstandalone-full-ha.xmlで、サーバーIDを追加し、ソケットバインディングを編集しました
<management>
<security-realms>
<security-realm name="ManagementRealm">
<server-identities>
<ssl>
<keystore path="server-keystore.jks" relative-to="jboss.server.config.dir" keystore-password="mypassword"/>
</ssl>
</server-identities>
...
<management-interfaces>
<http-interface security-realm="ManagementRealm" http-upgrade-enabled="true">
<socket-binding http="management-http" https="management-https"/>
</http-interface>
</management-interfaces>
mvn を実行する前に、トラストストアを追加しました。
> set MAVEN_OPTS=-Djavax.net.ssl.trustStore=C:/pathto/client-truststore -Djavax.net.ssl.trustStorePassword=mypassword
後続の実行で接続がタイムアウトしています。エラーは次のとおりです。
> mvn wildfly:deploy -e (OR mvn wildfly:redeploy -e)
[INFO] BUILD FAILURE
...
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.0.2.Final:redeploy (default-cli) on project xyz-project-web: Could not execute goal redeploy on C:\projects\abc\xyz-project\trunk\xyz-project-web\target\xyz-project-web-0-SNAPSHOT.war. Reason: I/O Error could not execute operation '{
[ERROR] "operation" => "read-attribute",
[ERROR] "address" => [],
[ERROR] "name" => "launch-type"
[ERROR] }': java.net.ConnectException: JBAS012144: Could not connect to https-remoting://172.31.100.26:9993.
The connection timed out
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.0.2.Final:redeploy (default-cli)
on project xyz-project-web: Could not execute goal redeploy on C:\projects\abc\xyz-project\trunk\xyz-project-web\target\xyz-project-web-0-SNAPSHOT.war. Reason: I/O
Error could not execute operation '{
"operation" => "read-attribute",
"address" => [],
"name" => "launch-type"
}'
...
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Could not execute goal redeploy on C:\projects\abc\xyz-project\trunk\xyz-project-web\target\
test-project-web-0-SNAPSHOT.war. Reason: I/O Error could not execute operation '{
"operation" => "read-attribute",
"address" => [],
"name" => "launch-type"
}'
...
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
Caused by: java.lang.IllegalStateException: I/O Error could not execute operation '{
"operation" => "read-attribute",
"address" => [],
"name" => "launch-type"
}'
...
at org.wildfly.plugin.deployment.AbstractDeployment.doExecute(AbstractDeployment.java:136)
... 24 more
Caused by: java.io.IOException: java.net.ConnectException: JBAS012144: Could not connect to https-remoting://172.31.100.26:9993. The connection timed out
at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:129)
... 28 more
Caused by: java.net.ConnectException: JBAS012144: Could not connect to https-remoting://172.31.100.26:9993. The connection timed out
at org.jboss.as.protocol.ProtocolConnectionUtils.connectSync(ProtocolConnectionUtils.java:119)
...
at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:127)
... 30 more
最初の実行後に関連する変更が見つかりません。