6.3. Use the Examples with JBoss Developer Studio
You can generate a subset of quickstart examples within JBoss Developer Studio; additionally, the source for all examples can be imported into JBoss Developer Studio. The procedures below outline both methods but you only need to use one. Details are also given for 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.
Procedure 6.2. Create an Example Using a Project Wizard
- In JBoss Central, under Start from a sample, select an application category and click one of the samples.
- In the New Project Example wizard, click . Once created, the project is listed in the Project Explorer view.
Procedure 6.3. Import an Example Using an Import Wizard
- Click →, expand Maven and double-click Existing Maven Projects.
- In the Root Directory field, enter the path to the example source code. Alternatively, click to navigate to the source code location. The wizard recursively searches the path for a
pom.xmlfile, which identifies the project as a Maven project. Thepom.xmlfile is listed under Projects once it is found. - Click . Once imported, the project is listed in the Project Explorer view.
Procedure 6.4. Compile and Deploy an Application Using JBoss Server Tools
- In the Project Explorer view, right-click the project name and click →.
- Under How do you want to select the server?, ensure Choose an existing server is selected.
- In the Server table, expand localhost, select jboss-eap-version where version denotes the JBoss EAP version, and click .
- Ensure that your project is listed in the Configured column and click . 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 default IDE web browser.