简体   繁体   中英

How to deploy WAR of Maven Project to JBoss server 6 or 7 from Eclipse?

In the run configurations, when we make the goals like => clean install jboss:hard-deploy , it works with jboss 4 and 5 but not with 6 and 7 !! Do you have any idea

Have this in your POM file:-

<plugin>
    <groupId>org.jboss.as.plugins</groupId>
    <artifactId>jboss-as-maven-plugin</artifactId>
    <version>{your jboss version}</version>
    <executions>
        <execution>
            <phase>install</phase>
            <goals>
                <goal>deploy</goal>
            </goals>
            <configuration>
                <hostname>localhost</hostname>
                <username>{your username}</username>
                <password>{your passwprd}</password>
                <jbossHome>{jboss home}</jbossHome>
                <fileName>{path to war}</fileName>
            </configuration>
        </execution>
    </executions>
</plugin>

Create a maven run configuration for your project in eclipse for jboss-as:deploy . Run the configuration.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM