Mr_and_Mrs_D
Mr_and_Mrs_D

Reputation: 34066

Eclipse - maven - what goal should I execute to actually deploy to Wildfly from maven (achieve the same result as the "run on server" eclipse command)

New to maven - I have an eclipse project that I can Right click > Run as... > Run on server and it runs successfully on my local Wildfly installation. Is there a way to RClick> Run as... and choose an appropriate maven goal to achieve the same effect (ie package as a war, copy to the servers dir (re)staring the server) ? Do I need to use a "wildfly maven plugin" ?

Similar question for tomcat: maven deploy goal failing

I am on eclipse Luna Java EE pack, maven 3.1 (the one that comes with eclipse) and using Wildfly 8.1.0.Final

Related:

EDIT: I am now on Wildfly - so I edited accordingly

The closest I got was:

<plugin>
    <groupId>org.wildfly.plugins</groupId>
    <artifactId>wildfly-maven-plugin</artifactId>
    <version>1.0.2.Final</version>
    <configuration>
        <jbossHome>C:/_/wildfly-8.1.0.Final</jbossHome>
    </configuration>
</plugin>

but I would like to avoid hardcoding the path there - how should I proceed ?

Upvotes: 1

Views: 3767

Answers (1)

Neeraj
Neeraj

Reputation: 327

You can use jboss plugin

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

Then set goal as: “jboss-as:deploy clean”

It will deploy war on JBoss server.

Upvotes: 1

Related Questions