Java Reference
In-Depth Information
your Maven installation (in case your project is being built by Maven). You can also
specify a JDK installation, a CVS installation, and email notification installations (such
as the email server, username, and password). Take note here that you don't specify
the path to your build.xml files, but instead you point to the place where Ant was
installed, so that later on Hudson can to talk to that Ant installation and issue the
ant -f build.xml command.
11.3.4
Configuring a project in Hudson
Now that you've configured Hudson to find the installations of Ant, Maven, and the
others, you can move on and configure a new job. To configure a new job with Hud-
son, first navigate to the main screen and select the New Job link from the list on the
left side. After that you'll be presented with a sample form to fill in. You need to spec-
ify a name for the job, and make sure you choose one of the presented build options.
If your build is Maven2-based, make sure you select Build A Maven2 Project; other-
wise, go with the Build A Free-style Software Project option. Click OK , and you'll be
presented the job-configuration screen shown on figure 11.7.
Here you're given the ability to configure the way you want to build your job. You
use the first lines to specify or change the name and the description of the job. After
that are some options regarding the source control management ( SCM ) system you
use (Subversion, CVS , and the like).
The next section tunes the settings for the build triggers—on what occasion you
want to trigger your build. You're presented with several options: poll the SCM sys-
tem to check whether a build is needed, build the project periodically, build it after
some dependent projects were built, and so on. Let's select the Poll The SCM trig-
ger; a field opens where we need to specify on what interval of time we want the poll
to happen. This field uses a nice syntax that follows the syntax of the UNIX cron
tool. We'd like to have our project executed every hour, so we specify @hourly in the
Figure 11.7
Job-configuration screen in Hudson
 
 
 
 
 
Search WWH ::




Custom Search