Configuring Maestro to Build Jetty

Building Jetty in the Maestro Project Server

The Maestro Project Server (which includes Continuum and Archiva) allows project teams to consistently ensure the health of the code through continuous integration. By default, the Maestro Project Server checks hourly for any changes in a project's source files and automatically re-builds for you.

Typically, the Maestro Project Server is installed on a server, not your local system. For the purposes of the Jetty demonstration, we are using a local file system as SCM so the demonstration does not require installation of other, external programs. The downside of that is that the Maestro Project Server will always think the sources have changed and re-build.

This section will guide you through adding and building the Jetty project in the Maestro Project server.

Adding Jetty to the Maestro Project Server

To add Jetty to the Maestro Project Server:

  1. Start Maestro Project Server per instructions in the Maestro Project Server User Guide.
  2. Navigate to http://localhost:8080/.

    Note: If the Maestro process is running, but you cannot display the page in your browser, it may be due to a port conflict. If Maestro automatically started during installation and there was already another process listening on port 8080, then you need to reconfigure Maestro's port number. Please see the Section titled Changing the Maestro Project Server's Port Number in the Maestro Project Server User Guide.

  3. Login to the Maestro Project Server. Click Login in the upper left of the horizontal navigation bar and fill in your username and password.

    You must be logged in as a user that has been granted the right to add projects. By default the "admin" user has those rights. Please refer to the Maestro Project Server User Guide for help in creating/logging in as an administrator or as a user with the correct privileges.

  4. Click Project Server.
  5. Under the Configure Menu, click Build Management.
  6. Under POM URL Protocol Options, check FILE and click Save. This allows you to specify a project via a file path formatted as a URL. This is left off by default as it can create a security issue.

    You can manually set the FILE protocol by editing [maestro_home]\projectserver\apps\continuum\WEB-INF\classes\META-INF\plexus\application.xml.

    Make sure that the <allowedScheme>file</allowedScheme> tag is present and not commented out.

    You need to restart Maestro Project Server for the changes to take effect.

  7. Click Build Management, either from the top horizontal navigation bar or from the link in the middle of the Maestro Project Server home page.
  8. Add the Mort Bay project. In the left navigation bar, under Add Project, click Maven 2.0.x Project.
    1. From Upload POM browse to the location of the POM in [maestro_home]\samples\mortbay\pom.xml. For example, C:\Maestro\samples\mortbay\pom.xml.
    2. Take the default Project Group, which is Defined by POM.
    3. From the Build Definition Template pull-down menu, select a build template. For the Mort Bay project, select Default from the menu.
    4. Click the Add button.
    5. Build the Mort Bay project. Click the build icon to the right of the project name.
  9. Add the Jetty project. Create a Project Group for Jetty. There are two ways to add a project group:

    Ways to Add a Project Group

    1. To manually define the project group:

      1. While in the Show Project Groups screen, click Add Project Group.

      2. On the Add Project Group screen (see figure below), fill in the following information and click Save:

      • Project Group Name: Jetty Server Project
      • Project Group Id: com.exist.maestro.samples.jetty
      • Description: (You may enter any text you wish to describe your project.)
      • Local Repository: (You may choose from the list of available repositories.)

      3. Continue with step 10, below.

    2. To let the POM define the project group automatically, continue with step 10, below.
  10. Add the Jetty project. In the left navigation bar, under Add Project, click Maven 2.0.x Project.
  11. Specify the location of the Jetty pom.xml file. Provide a POM URL using the file syntax as shown in the figure below. For example:

    file:///[maestro_home]/samples/jetty/pom.xml

    Where: [maestro_home] is the directory in which you installed the Maestro Project Server.

  12. Make your selection from the Project Group pull-down menu, depending on whether you manually defined the project group or want the POM to define it:

    Selection from Project Group pull-down menu

    If: Then:
    You manually defined the project group, Select the project group name you had created for the Jetty project (in our example above this was Jetty Server Project).
    You want the POM to define the project group, Select Defined by POM.

    By specifying the parent POM we automatically added all the modules by aggregation. Without the parent POM you would have to add the projects individually.

  13. From the Build Definition Template pull-down menu, select build template you want to use for the project. For the Jetty project, select Default.
  14. Click Add. On the Project Group Summary page for the Jetty Server Project, you will see all the member projects listed.
  15. Now that you have added the project turn the file option off. Under Project Server, click Build Management and uncheck the FILE box and click Save.