EMMA Coverage Report (generated Sun Sep 18 11:34:27 PHT 2011)
[all classes][org.apache.maven.continuum.scheduler]

COVERAGE SUMMARY FOR SOURCE FILE [ContinuumBuildJob.java]

nameclass, %method, %block, %line, %
ContinuumBuildJob.java0%   (0/1)0%   (0/2)0%   (0/73)0%   (0/18)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ContinuumBuildJob0%   (0/1)0%   (0/2)0%   (0/73)0%   (0/18)
ContinuumBuildJob (): void 0%   (0/1)0%   (0/3)0%   (0/1)
execute (JobExecutionContext): void 0%   (0/1)0%   (0/70)0%   (0/17)

1package org.apache.maven.continuum.scheduler;
2 
3/*
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements.  See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership.  The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License.  You may obtain a copy of the License at
11 *
12 *   http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied.  See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 */
21 
22import org.apache.maven.continuum.Continuum;
23import org.apache.maven.continuum.ContinuumException;
24import org.apache.maven.continuum.model.project.Schedule;
25import org.codehaus.plexus.scheduler.AbstractJob;
26import org.slf4j.Logger;
27import org.quartz.JobDetail;
28import org.quartz.JobExecutionContext;
29 
30/**
31 * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
32 * @version $Id: ContinuumBuildJob.java 780708 2009-06-01 16:29:31Z jmorales $
33 */
34public class ContinuumBuildJob
35    extends AbstractJob
36{
37    public static final String BUILD_GROUP = "BUILD_GROUP";
38 
39    public void execute( JobExecutionContext context )
40    {
41        if ( isInterrupted() )
42        {
43            return;
44        }
45 
46        // ----------------------------------------------------------------------
47        // Get the job detail
48        // ----------------------------------------------------------------------
49 
50        JobDetail jobDetail = context.getJobDetail();
51 
52        // ----------------------------------------------------------------------
53        // Get data map out of the job detail
54        // ----------------------------------------------------------------------
55 
56        Logger logger = (Logger) jobDetail.getJobDataMap().get( AbstractJob.LOGGER );
57 
58        String jobName = jobDetail.getName();
59 
60        logger.info( ">>>>>>>>>>>>>>>>>>>>> Executing build job (" + jobName + ")..." );
61 
62        Continuum continuum = (Continuum) jobDetail.getJobDataMap().get( ContinuumSchedulerConstants.CONTINUUM );
63 
64        Schedule schedule = (Schedule) jobDetail.getJobDataMap().get( ContinuumSchedulerConstants.SCHEDULE );
65 
66        try
67        {
68            continuum.buildProjects( schedule );
69        }
70        catch ( ContinuumException e )
71        {
72            logger.error( "Error building projects for job" + jobName + ".", e );
73        }
74 
75        try
76        {
77            if ( schedule.getDelay() > 0 )
78            {
79                Thread.sleep( schedule.getDelay() * 1000 );
80            }
81        }
82        catch ( InterruptedException e )
83        {
84        }
85    }
86}

[all classes][org.apache.maven.continuum.scheduler]
EMMA 2.0.5312 (C) Vladimir Roubtsov