GregD
GregD

Reputation: 1944

Deploy jBoss 7 before functional tests with maven

I'd like to deploy my ear, with maven, to an installed jBoss 7 before I'm running my functional tests on cruiseControl.

The functional tests are in another module.

What's the best approach to deploy the jBoss server from maven before the test module is executed?

EDIT:

I have found the following but it doesn't work:

        <plugin>
            <groupId>org.jboss.as.plugins</groupId>
            <artifactId>jboss-as-maven-plugin</artifactId>
            <version>7.1.1.Final</version>
            <executions>
                <execution>
                    <id>jboss-undeploy</id>
                    <goals>
                        <goal>undeploy</goal>
                    </goals>
                    <phase>clean</phase>
                </execution>
                <execution>
                    <id>jboss-deploy</id>
                    <goals>
                        <goal>deploy</goal>
                    </goals>
                    <phase>package</phase>
                </execution>
            </executions>
            <configuration>
                <jbossHome>${jboss.directory}</jbossHome>
                <serverName>default</serverName>
                <hostName>localhost</hostName>
                <port>8099</port>
                <fileNames>
                    <fileName>${basedir}\target\ecad-application-ws-ear-1.0.0-SNAPSHOT.ear</fileName>
                </fileNames>
            </configuration>
        </plugin>

I'm getting :

[ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven- plugin:7.1.1.Final:deploy (jboss-deploy) on project ecad-application-ws-ear:   Error executing FORCE_DEPLOY: Could not execute operation '{
[ERROR] "operation" => "read-children-names",
[ERROR] "child-type" => "deployment"
[ERROR] }': java.net.ConnectException: JBAS012144: Could not connect to remote://localhost:8099. The connection timed out
[ERROR] -> [Help 1]

but I didn't specify the remote:// anywhere?

Upvotes: 1

Views: 131

Answers (1)

WildCherryCandy
WildCherryCandy

Reputation: 53

Try it in yout command line.

mvn deploy -DskipTests

-DskipTests directive configure maven to skip testing.

Upvotes: 1

Related Questions