JBoss.orgCommunity Documentation
JBoss Developer Studio provides an option to download and import a ready-made project that you can explore learn from.
To adjust the settings of the Project Examples feature you need to navigate to
→ → → .The Show experimental sites checkbox serves to enable or disable user sites in the Project Example dialog ( → ).
As you can see from the Project Examples Preferences image you can add a custom project example that can be provided by anyone. This feature can, for example, facilitate project testing.
In oder to add a new project example you need to select the User sites option and press the button to the right.
When the Add Project Example Site dialog is displayed. The dialog contains two input fields: Name, where you need to specify the name of the new entry and URL,which has to point to the XML file that contains example project(s) properties. The structure of the XML file is discussed in more detail in a later chapter of this guide. Alternatively, if the XML is stored on your local machine, you can hit the button to select the file in the file system.
button is pressed theHere is an example of the XML file that holds project example settings:
<projects> <project> <category>User Examples</category> <name>User Project Example</name> <shortDescription> Short project description. </shortDescription> <description> Full project description. </description> <size>10900</size> <url> http://projectexample.org/projectexample.zip </url> </project> </projects>
Once you define the location of the XML file with projects settings you will see a new user site entry added. Please note now if you select the entry you can edit and remove it with the corresponding buttons to the right. You can not perform such operations with the Plugin provides sites.
When the user sites location is set up you can download and install the project(s). Please see the next chapter of the guide for more details.
To download a project example and start working with it you need to perform a few steps:
Go to the menu bar and select
→ →Select
→ (You can also select from menu bar: → or directly by selecting → → menu )Alternatively, you should navigate to JBoss Tools option (or just type in the first letters of the word "JBoss" for quick search), expand the option and select Project Examples, and click the button.
→ , scroll down to find theNow in the New Project Example dialog you can select a project you would like to explore and a site to download it from
The Project Examples Wizard provides a filter field to more easily locate the project examples you want, so you can type in the project you would like to explore in the field.
Some project examples have dependencies which could not be automatically configured. In these cases you will receive a message prompt listing the detected requirements (see the figure below).
You should click the
button to see the list of requirements and make any necessary fixes.If you have previously specified user sites (see the User Sites chapter) they also will be displayed in the list of project examples in the category that was defined in the XML file with user sites settings.
Pleas note that to view the user sites you need to have Show experimental sites checked.
The Show the Quick Fix Dialog option is described in the Quick Fixes section.
Press the
button to start downloading the project from the repositoryWhen downloading is finished the project will be imported automatically and you will be able to see it in the Package Explorer view.
Now you can run the application on the server.
For further operation add the following code to .project files of your Web project example.
<buildCommand> <name>org.jboss.tools.jst.web.kb.kbbuilder</name> <arguments> </arguments> </buildCommand> ... <nature>org.jboss.tools.jst.web.kb.kbnature</nature>
It is needed for Code Assist and JSF EL Validation to function correctly.
The Project Examples Wizard has an option for making quick fixes for the imported project to easily fix possible issues like missing servers, Seam runtimes etc.
To enable the quick fix option you need to check the Show the Quick Fix dialog while choosing the Project Example.
When the project you selected is downloaded it will be checked for missing dependences and if any are detected you will see a dialog listing the problems.
To fix the problem you need to:
Select the problem from the list
Click the
buttonYou will be offered a solution or a number of solutions to the problem.
In this case (see the image above), when the
button is pressed, the Seam Settings dialog box will be displayed where you need to provide a path to the Seam environment in order to fix the issue.When the problem is fixed you will be returned to the Quick Fix dialog box with the remaining problems to be fixed.
You can also fix problems before downloading. When the project example is selected you will see warning message on the New Project Example dialog.
To fix the problem immediately you need to:
Click the New Project Example dialog
button in theSelect the problem from the list in the Requirement details dialog box
Click the
buttonYou will be offered a solution to the problem.