0 Replies Latest reply on Apr 8, 2015 7:38 AM by akrima

    How to deploy .jar file to JBoss EAP6 server using Maven?

    akrima Newbie

      I have a maven EJB projet whitch i want to deploy by maven command. I can take the jar of that projet and put it into the folder deployement of my jboss server but i want to do that by maven. I made some searchs and i found :

      In the goals i can make : jboss-as:deploy.

      In the pom.xml:

      <plugin> 
           <groupId>org.jboss.as.plugins</groupId>
           <artifactId>jboss-as-maven-plugin</artifactId>
                <configuration>
                     <filename>${artifactId}-${project.version}.jar</filename>
                </configuration>
      </plugin>

      The errors whitch gives me are:

      [ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.7.Final:deploy (default-cli) on project myapp: Could not execute goal deploy on D:\workspaces\myapp\target\myprojet-0.0.1.jar. 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 remote://localhost:9999. The connection timed out

      This is a part of the standalone.xml:

      <interfaces> 
           <interface name="management">
                <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
           </interface>     
           <interface name="public">
                <inet-address value="${jboss.bind.address:127.0.0.1}"/>
           </interface>
           <interface name="unsecure">
                <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
           </interface>
      </interfaces> 
      <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
      <socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9998}"/>
      <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9999}"/>
      <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/>
      <socket-binding name="ajp" port="8009"/> <socket-binding name="http" port="8080"/>
      <socket-binding name="https" port="8443"/> <socket-binding name="remoting" port="4447"/>
      <socket-binding name="txn-recovery-environment" port="4712"/>
      <socket-binding name="txn-status-manager" port="4713"/>
      <outbound-socket-binding name="mail-smtp">
      <remote-destination host="localhost" port="25"/>
      </outbound-socket-binding>
      </socket-binding-group>

      I have a local Jboss Server. and i tried this (in the pom):

      <plugin> 
                <groupId>org.jboss.as.plugins</groupId>
                <artifactId>jboss-as-maven-plugin</artifactId>
                <version>7.5.Final</version>
           <configuration>
                <filename>${artifactId}-${project.version}.jar</filename>
                <username>test1</username>
                <password>Pass9584</password>
           </configuration>
      </plugin>