Create JSF2 + EJB3.1 + JPA2 project skeleton using Maven:archetype and deploy on JBoss WildFly 8.1

Source: Internet
Author: User
Tags jboss wildfly

Execute the following command to create the project skeleton:

MVN archetype:generate-darchetypegroupid=org.jboss.spec.archetypes-darchetypeartifactid= jboss-javaee6-webapp-ear-archetype-darchetypeversion=7.1.1.final-dgroupid={your GroupID}-DartifactId={ Your Artifactid}-dversion=1.0-snapshot

After the project has been generated, to support deployment operations on wildfly, you need to add the Wildfly-maven-plugin method as follows:

Locate the build node for pom.xml under the root directory and add the following:

<build> ...        <plugins> ...            <plugin>                <groupId>org.wildfly.plugins</groupId>                <artifactId> wildfly-maven-plugin</artifactid>                <version>1.0.1.Final</version>            </plugin>            ...        </plugins> ...    </build>

Then switch to the ear directory, locate the Pom.xml file, and add the following:

<plugin><groupid>org.wildfly.plugins</groupid><artifactid>wildfly-maven-plugin</ Artifactid></plugin

Also, to be able to package, add it under Build:

<defaultGoal>package</defaultGoal>


OK is done. If you want to develop on this basis, you also need to modify the Persistence.xml and *.ds.xml files.

Deployment method:

MVN Clean INSTALLCD ***-earmvn Wildfly:deploy


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.