5.3. Use the Archetypes with JBoss Developer Studio

You can use the archetypes to generate projects within JBoss Developer Studio using the IDE New Maven Project wizard. This is detailed in the procedure below, together with information on compiling and deploying applications to JBoss EAP using the workflow shortcuts provided by JBoss Developer Studio.
The procedures assume that JBoss EAP is already installed and Maven is configured to use the JBoss EAP and JBoss Web Framework Kit Maven repositories. They further assume that JBoss Developer Studio is installed and a server adapter has been generated for the JBoss EAP instance to enable efficient IDE-server communication. For information on configuring JBoss Developer Studio for use with JBoss EAP and JBoss Web Framework Kit, see the JBoss Web Framework Kit Start Developing guide.

Note

You may also be able to create the archetypes using the project wizards listed in JBoss Central under Start from scratch but you must check the archetype version being used before continuing. The archetype version is predetermined in the project wizards and it may not match the version of this JBoss Web Framework Kit release.

Procedure 5.3. Create a Project from an Archetype Using a Maven Project Wizard

  1. Click FileNewMaven Project.
  2. Ensure the Create a simple project check box is not selected and click Next.
  3. Click Add Archetype.
  4. Complete the fields about the specific JBoss Web Framework Kit archetype as follows:
    • In the Archetype Group Id field, type org.jboss.archetype.wfk.
    • In the Archetype Artifact Id field, type the unique Artifact Id.
    • In the Archetype Version field, type version.Final where version denotes the complete three-digit version number for this JBoss Web Framework Kit release. For example, 2.7.0.Final for JBoss Web Framework Kit 2.7.0.
    • In the Repository URL field, type http://central.sonatype.org/.
  5. Click OK.
  6. From the archetype list, ensure the added archetype is selected and click Next.
  7. Complete the fields about the project to be created as follows:
    • In the Group Id field, type a package for the project.
    • In the Artifact Id field, type a name for the project.
  8. Click Finish. Once the project is created, it is listed in the Project Explorer view.

Procedure 5.4. Compile and Deploy an Application Using JBoss Server Tools

  1. In the Project Explorer view, right-click the project name and click Run asRun on Server.
  2. Under How do you want to select the server?, ensure Choose an existing server is selected.
  3. In the Server table, expand localhost, select jboss-eap-version where version denotes the JBoss EAP version, and click Next.
  4. Ensure that your project is listed in the Configured column and click Finish. The Console view automatically becomes the view in focus and displays the output from the JBoss EAP server. Once deploying is complete, the web application opens in the IDE default web browser.