Chapter 3. Opening Pogamut examples

Table of Contents

Opening Pogamut example project

Opening Pogamut example project

This section shows you how to open and/or add not-installed Pogamut example projects in NetBeans (7.1.1).

Opening installed Pogamut example project

Step 1. If you have installed Pogamut with Pogamut installer a number of Pogamut example projects should be available in your local Maven NetBeans repository. To access them click File->New Project

Step 2. Select Maven tab then select Project from Archetype and click Next.

Step 3. Unfold Local Archetype Catalog. A number of Pogamut examples should appear. Select one of the examples (preferably Pogamut Empty Bot example) and click Next. Note that if the Pogamut examples projects are missing or if you encounter problems with opening them, see the next section on how to add Pogamut example projects to NetBeans from scratch.

Step 4. You can name the project - this will affect the name of the folder on disk and NOT the name of the project in NetBeans. The name of the project depends on the example you were opening (e.g. Empty Bot will be named 00-empty-bot, etc.). You can still change the name later. Continue with clicking Finish. Maven now tries to open the project and download the project dependencies (you NEED to be connected to internet, otherwise it won't work).

Step 5. If everything proceeded normally a new project should appear in your NetBeans project tab (00-empty-bot) and in NetBeans output window the log shoud end with BUILD SUCCESS line.

Step 6. To prepare the project for the development (and to get rid of all error messages) it is now necessary to rebuild the project. Do this by right clicking the project in NetBeans project tab and select Clean and Build. The project should be rebuilt and the Maven should donwload rest of the dependencies. In the end all error messages should disappear and in the output window you should see BUILD SUCCESS again.

Step 7. For some reason NetBeans 7.1.1 sometimes does not download automatically project JavaDoc and Pogamut source code for reviewing. To do this manually unfold the project in NetBeans tab and right click Dependencies.

Step 8. Now click Download Sources and wait until everything is downloaded (see the progres bar in lower right of NetBeans IDE, it should not take more than 2 minutes), the JavaDoc should appear right away. If not, try to Download JavaDoc and then Download Sources again. If the JavaDoc is still missing, try to restart NetBeans - the JavaDoc should now appear in the IDE.

Troubleshooting. If you encountered some problem during the opening of the example, you can add Pogamut example manually to NetBeans, which should work everytime and which is adressed below in section Adding Pogamut example projects

Adding Pogamut example projects

This section covers how to add a Pogamut example project from our online Maven artifactory to NetBeans. Note that you don't need to have Pogamut installed on your machine in order to do this. To see a list of all Pogamut Maven archetypes you can add visit our Pogamut Maven archetypes catalog. We recommend to use latest archetypes versions that are AT THE BOTTOM of the file!

Step 1. To add a Pogamut example project from our online Maven repository to NetBeans click File->New Project

Step 2. Select Maven tab then select Project from Archetype and click Next.

Step 3. When Maven Archetype window appears, click the Add... button.

Step 4. A window named Specify archetype details should appear. Here you can manually fill out the information about what Maven archetype you want to download. In our example we are filling out our basic example - the empty bot.

  • Group Id: cz.cuni.amis.pogamut.ut2004.examples

  • Artifact Id: 00-empty-bot-archetype

  • Version: 3.3.0

  • Repository:http://diana.ms.mff.cuni.cz:8081/artifactory/repo

Double check if every line is filled out correctly - any mistake prevent the archetype to be downloaded. When you are finished click Ok. Again, to see a list of all Pogamut Maven archetypes you can add visit our Pogamut Maven archetypes catalog. We recommend to use latest archetypes versions that are AT THE BOTTOM of the file!

Step 5. A new custom archetype should appear in Maven Archetype window. Select it and click next. You can now continue with Step 4 in previous guide (Opening Pogamut example project).