how to deploy a war to JBoss AS7 running on local machine through jboss-as-maven-plugin
atiyou Jan 17, 2013 10:24 AMHi ,
As i didn't fount a jenkins plugin that could deploy to JBOSS EAP 6 i'm trying to use jboss-as maven plugin to do it durring install phase of my build...
First i would like to mention that JBOSS is located at the same machine (i don't have to do remote deploy..)
But when i launch the jenkins build i get errors, no matter if i mention (host, port, user & password) or not, elsewhere i get nothing from JBoss console side
So i'm using SUSE Linux Enterprise Server 11 SP2 (x86_64)
I started my jboss like this :
jboss@devsaa:~/domain/bin> ./domain.sh -Djboss.bind.address.management=10.69.57.96 -Djboss.bind.address=10.69.57.96 |
My plugin configuration is like this :
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>7.3.Final</version>
<configuration>
<!-- optional configuration as we make a local deploy
<host>10.69.57.96</host>
<port>9999</port>
<name>jboss</name>
<password>******</password> -->
<domain>
<server-groups>
<server-group>main-server-group</server-group>
</server-groups>
</domain>
</configuration>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
And i got those errors :
11 janv. 2013 11:53:26 hudson.maven.ExecutedMojo <init>
WARNING: Failed to getClass for org.jboss.as.plugin.deployment.Deploy
mojoStarted org.jboss.as.plugins:jboss-as-maven-plugin:7.3.Final(default)
[INFO]
[INFO] --- jboss-as-maven-plugin:7.3.Final:deploy (default) @ foo-foundation-webapp ---
11 janv. 2013 11:53:27 org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.7.GA
11 janv. 2013 11:53:27 org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.7.GA
11 janv. 2013 11:53:27 org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.12.GAmojoFailed org.jboss.as.plugins:jboss-as-maven-plugin:7.3.Final(default)
projectFailed fr.foo.foundation:foo-foundation-webapp:1.0-SNAPSHOT
sessionEnded
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 44.717s
[INFO] Finished at: Fri Jan 11 11:53:33 CET 2013
[INFO] Final Memory: 72M/120M
[INFO] ------------------------------------------------------------------------
mavenExecutionResult exceptions not empty
message : Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.3.Final:deploy (default) on project foo-foundation-webapp: Could not execute goal deploy on /pic/dev/workspace_jenkins/foundation-webapp/workspace/target/foo-foundation-webapp.war. Reason: Error could not execute operation '{
"address" => [],
"operation" => "read-attribute",
"name" => "launch-type" }'.
cause : Could not execute goal deploy on /pic/dev/workspace_jenkins/foundation-webapp/workspace/target/foo-foundation-webapp.war. Reason: Error could not execute operation '{ "address" => [], "operation" => "read-attribute", "name" => "launch-type" }'. Stack trace : org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.3.Final:deploy (default) on project foo-foundation-webapp: Could not execute goal deploy on /pic/dev/workspace_jenkins/foundation-webapp/workspace/target/foo-foundation-webapp.war. Reason: Error could not execute operation '{ "address" => [], "operation" => "read-attribute", "name" => "launch-type" }'. at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153
..........................
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
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)
.............................
Caused by: java.io.IOException: java.net.ConnectException: JBAS012144: Could not connect to remote://localhost:9999. The connection timed out
at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:129)
at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:71)
at org.jboss.as.plugin.common.AbstractServerConnection.isDomainServer(AbstractServerConnection.java:181) ... 35 morechannel stopped
Finished: FAILURE
So even when i mention the host address 10.69.X.X, i see in the log file Could not connect to remote://localhost:9999 !
At this moment, i just want to make simple deploy in the same machine
Plz find the full logs in attached file
Thanks for feedback
-
jboss-deploy-.log.zip 2.0 KB
-
server.log.zip 1.1 KB