Domanda

This is my plugin information in pom.xml

            <plugin>
            <groupId>org.jboss.as.plugins</groupId>
            <artifactId>jboss-as-maven-plugin</artifactId>
            <version>7.0.2.Final</version>
        </plugin>

I have downloaded the jboss AS 7.0.2 on my laptop under the /jboss folder (Mac OSX) Although I am able to it as a local server on my Eclipse IDE and am able to run my projects via that.I wanted to give a try with mvn jboss-as:deploy.

And it gives this error :

[INFO] --- jboss-as-maven-plugin:7.0.2.Final:deploy (default-cli) @ propertyfinder ---
[INFO] Executing goal deploy on server localhost (127.0.0.1) port 9999.
Apr 3, 2014 2:08:50 AM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.0.Beta2
Apr 3, 2014 2:08:50 AM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.0.Beta2
Apr 3, 2014 2:08:50 AM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.0.Beta2
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.446s
[INFO] Finished at: Thu Apr 03 02:08:55 EDT 2014
[INFO] Final Memory: 7M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.0.2.Final:deploy (default-cli) on project propertyfinder: Could not execute goal deploy on propertyfinder.war. Reason: Could not connect to remote://localhost:9999 in 5000ms. Make sure the server is running and/or consider setting a longer timeout by setting -Dorg.jboss.as.client.connect.timeout=<timeout in ms>. -> [Help 1]

Any help is appreciated.

È stato utile?

Soluzione

If you are starting with JBOSS. Before starting JBOSS application server. add the management user

  1. Refer link to add management user.
  2. Start Server by running standalone.bat( windows) or standalone.sh(linux) under bin directory
  3. You can quickly verify if the server is started or not by logging into home page http://localhost:9990/console.
  4. In the log verify if port 9999 is listening which is used for deployment( a default configuration, else you can check which port is listening for remoting)
  5. Use the following maven plug-in configuration. user name and password is the management user and password

    <plugin>
        <groupId>org.jboss.as.plugins</groupId>
        <artifactId>jboss-as-maven-plugin</artifactId>
        <version>${jboss.as.plugin.version}</version>
        <configuration>
            <hostname>localhost</hostname>
            <username>{user name}</username>
            <password>{password}</password>
            <port>9999</port>
        </configuration>
    </plugin>
    
  6. You can use either jboss-as:deploy or jboss-as:redeploy

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top