View Javadoc

1   package org.apache.maven.continuum.configuration;
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  
22  import org.apache.continuum.buildqueue.BuildQueueService;
23  import org.apache.continuum.buildqueue.BuildQueueServiceException;
24  import org.apache.continuum.configuration.BuildAgentConfiguration;
25  import org.apache.continuum.configuration.BuildAgentGroupConfiguration;
26  import org.apache.continuum.configuration.ContinuumConfiguration;
27  import org.apache.continuum.configuration.ContinuumConfigurationException;
28  import org.apache.continuum.configuration.GeneralConfiguration;
29  import org.apache.continuum.dao.ScheduleDao;
30  import org.apache.continuum.dao.SystemConfigurationDao;
31  import org.apache.maven.continuum.model.project.BuildQueue;
32  import org.apache.maven.continuum.model.project.Schedule;
33  import org.apache.maven.continuum.model.system.SystemConfiguration;
34  import org.apache.maven.continuum.store.ContinuumStoreException;
35  import org.codehaus.plexus.util.FileUtils;
36  import org.codehaus.plexus.util.StringUtils;
37  import org.slf4j.Logger;
38  import org.slf4j.LoggerFactory;
39  
40  import java.io.File;
41  import java.io.IOException;
42  import java.util.ArrayList;
43  import java.util.List;
44  import javax.annotation.Resource;
45  
46  /**
47   * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
48   * @version $Id: DefaultConfigurationService.java 1412760 2012-11-23 06:28:56Z brett $
49   */
50  public class DefaultConfigurationService
51      implements ConfigurationService
52  {
53      private static final Logger log = LoggerFactory.getLogger( DefaultConfigurationService.class );
54  
55      // when adding a requirement, the template in spring-context.xml must be updated CONTINUUM-1207
56  
57      /**
58       * @plexus.configuration default-value="${plexus.home}"
59       */
60      private File applicationHome;
61  
62      @Resource
63      private ScheduleDao scheduleDao;
64  
65      @Resource
66      private SystemConfigurationDao systemConfigurationDao;
67  
68      @Resource
69      private BuildQueueService buildQueueService;
70  
71      @Resource
72      private ContinuumConfiguration configuration;
73  
74      private GeneralConfiguration generalConfiguration;
75  
76      // ----------------------------------------------------------------------
77      //
78      // ----------------------------------------------------------------------
79  
80      private SystemConfiguration systemConf;
81  
82      private boolean loaded = false;
83  
84      // ----------------------------------------------------------------------
85      //
86      // ----------------------------------------------------------------------
87  
88      public void initialize()
89          throws ConfigurationLoadingException, ContinuumConfigurationException
90      {
91          loadData();
92      }
93  
94      public ScheduleDao getScheduleDao()
95      {
96          return scheduleDao;
97      }
98  
99      public void setScheduleDao( ScheduleDao scheduleDao )
100     {
101         this.scheduleDao = scheduleDao;
102     }
103 
104     public BuildQueueService getBuildQueueService()
105     {
106         return buildQueueService;
107     }
108 
109     public void setBuildQueueService( BuildQueueService buildQueueService )
110     {
111         this.buildQueueService = buildQueueService;
112     }
113 
114     public SystemConfigurationDao getSystemConfigurationDao()
115     {
116         return systemConfigurationDao;
117     }
118 
119     public void setSystemConfigurationDao( SystemConfigurationDao systemConfigurationDao )
120     {
121         this.systemConfigurationDao = systemConfigurationDao;
122     }
123 
124     public ContinuumConfiguration getConfiguration()
125     {
126         return configuration;
127     }
128 
129     public void setConfiguration( ContinuumConfiguration configuration )
130     {
131         this.configuration = configuration;
132     }
133 
134     public File getApplicationHome()
135     {
136         return applicationHome;
137     }
138 
139     public void setApplicationHome( File applicationHome )
140     {
141         this.applicationHome = applicationHome;
142     }
143 
144     public void setInitialized( boolean initialized )
145     {
146         generalConfiguration.setInitialized( initialized );
147     }
148 
149     public boolean isInitialized()
150     {
151         return systemConf.isInitialized() || generalConfiguration.isInitialized();
152     }
153 
154     public String getUrl()
155     {
156         String baseUrl = generalConfiguration.getBaseUrl();
157         if ( StringUtils.isEmpty( baseUrl ) )
158         {
159             baseUrl = systemConf.getBaseUrl();
160             setUrl( baseUrl );
161         }
162         return baseUrl != null ? baseUrl : "";
163     }
164 
165     public void setUrl( String url )
166     {
167         generalConfiguration.setBaseUrl( url );
168     }
169 
170     /**
171      * @see org.apache.maven.continuum.configuration.ConfigurationService#getBuildOutputDirectory()
172      */
173     public File getBuildOutputDirectory()
174     {
175         File buildOutputDirectory = generalConfiguration.getBuildOutputDirectory();
176         if ( buildOutputDirectory == null )
177         {
178             buildOutputDirectory = getFile( systemConf.getBuildOutputDirectory() );
179             setBuildOutputDirectory( buildOutputDirectory );
180         }
181         return buildOutputDirectory;
182     }
183 
184     public void setBuildOutputDirectory( File buildOutputDirectory )
185     {
186         File f = buildOutputDirectory;
187         try
188         {
189             f = f.getCanonicalFile();
190         }
191         catch ( IOException e )
192         {
193         }
194         generalConfiguration.setBuildOutputDirectory( f );
195     }
196 
197     public File getWorkingDirectory()
198     {
199         File workingDirectory = generalConfiguration.getWorkingDirectory();
200         if ( workingDirectory == null )
201         {
202             workingDirectory = getFile( systemConf.getWorkingDirectory() );
203             setWorkingDirectory( workingDirectory );
204         }
205         return workingDirectory;
206     }
207 
208     public void setWorkingDirectory( File workingDirectory )
209     {
210         File f = workingDirectory;
211         try
212         {
213             f = f.getCanonicalFile();
214         }
215         catch ( IOException e )
216         {
217         }
218 
219         generalConfiguration.setWorkingDirectory( f );
220     }
221 
222     public File getDeploymentRepositoryDirectory()
223     {
224         File deploymentDirectory = generalConfiguration.getDeploymentRepositoryDirectory();
225         if ( deploymentDirectory == null )
226         {
227             deploymentDirectory = getFile( systemConf.getDeploymentRepositoryDirectory() );
228             setDeploymentRepositoryDirectory( deploymentDirectory );
229         }
230         return deploymentDirectory;
231     }
232 
233     public void setDeploymentRepositoryDirectory( File deploymentRepositoryDirectory )
234     {
235         generalConfiguration.setDeploymentRepositoryDirectory( deploymentRepositoryDirectory );
236     }
237 
238     public String getBuildOutput( int buildId, int projectId )
239         throws ConfigurationException
240     {
241         File file = getBuildOutputFile( buildId, projectId );
242 
243         try
244         {
245             if ( file.exists() )
246             {
247                 return FileUtils.fileRead( file.getAbsolutePath() );
248             }
249             else
250             {
251                 return "There is no output for this build.";
252             }
253         }
254         catch ( IOException e )
255         {
256             log.warn( "Error reading build output for build '" + buildId + "'.", e );
257 
258             return null;
259         }
260     }
261 
262     public File getReleaseOutputDirectory()
263     {
264         File releaseOutputDirectory = generalConfiguration.getReleaseOutputDirectory();
265 
266         if ( releaseOutputDirectory == null )
267         {
268             releaseOutputDirectory = getFile( systemConf.getReleaseOutputDirectory() );
269             setReleaseOutputDirectory( releaseOutputDirectory );
270         }
271         return releaseOutputDirectory;
272     }
273 
274     public void setReleaseOutputDirectory( File releaseOutputDirectory )
275     {
276         if ( releaseOutputDirectory == null )
277         {
278             generalConfiguration.setReleaseOutputDirectory( releaseOutputDirectory );
279             return;
280         }
281 
282         File f = releaseOutputDirectory;
283         try
284         {
285             f = f.getCanonicalFile();
286         }
287         catch ( IOException e )
288         {
289         }
290         generalConfiguration.setReleaseOutputDirectory( f );
291     }
292 
293     public List<BuildAgentConfiguration> getBuildAgents()
294     {
295         return generalConfiguration.getBuildAgents();
296     }
297 
298     public void addBuildAgent( BuildAgentConfiguration buildAgent )
299         throws ConfigurationException
300     {
301         // trim trailing space
302         buildAgent.setUrl( buildAgent.getUrl().trim() );
303 
304         List<BuildAgentConfiguration> buildAgents = generalConfiguration.getBuildAgents();
305         if ( buildAgents == null )
306         {
307             buildAgents = new ArrayList<BuildAgentConfiguration>();
308         }
309 
310         for ( BuildAgentConfiguration agent : buildAgents )
311         {
312             if ( agent.getUrl().trim().equals( buildAgent.getUrl() ) )
313             {
314                 throw new ConfigurationException( "Unable to add build agent: build agent already exist" );
315             }
316         }
317 
318         buildAgents.add( buildAgent );
319         generalConfiguration.setBuildAgents( buildAgents );
320     }
321 
322     public void removeBuildAgent( BuildAgentConfiguration buildAgent )
323     {
324         List<BuildAgentConfiguration> buildAgents = getBuildAgents();
325         if ( buildAgents != null )
326         {
327             for ( BuildAgentConfiguration agent : buildAgents )
328             {
329                 if ( agent.getUrl().equals( buildAgent.getUrl() ) )
330                 {
331                     buildAgents.remove( agent );
332                     break;
333                 }
334             }
335             generalConfiguration.setBuildAgents( buildAgents );
336         }
337     }
338 
339     public void updateBuildAgent( BuildAgentConfiguration buildAgent )
340     {
341         // trim trailing space
342         buildAgent.setUrl( buildAgent.getUrl().trim() );
343 
344         List<BuildAgentConfiguration> buildAgents = getBuildAgents();
345         if ( buildAgents != null )
346         {
347             for ( BuildAgentConfiguration agent : buildAgents )
348             {
349                 if ( agent.getUrl().trim().equals( buildAgent.getUrl() ) )
350                 {
351                     agent.setDescription( buildAgent.getDescription() );
352                     agent.setEnabled( buildAgent.isEnabled() );
353                     agent.setUrl( buildAgent.getUrl() );
354 
355                     return;
356                 }
357             }
358         }
359     }
360 
361     public boolean isDistributedBuildEnabled()
362     {
363         return generalConfiguration.isDistributedBuildEnabled();
364     }
365 
366     public void setDistributedBuildEnabled( boolean distributedBuildEnabled )
367     {
368         generalConfiguration.setDistributedBuildEnabled( distributedBuildEnabled );
369     }
370 
371     public void addBuildAgentGroup( BuildAgentGroupConfiguration buildAgentGroup )
372         throws ConfigurationException
373     {
374         List<BuildAgentGroupConfiguration> buildAgentGroups = generalConfiguration.getBuildAgentGroups();
375 
376         if ( buildAgentGroups == null )
377         {
378             buildAgentGroups = new ArrayList<BuildAgentGroupConfiguration>();
379         }
380 
381         for ( BuildAgentGroupConfiguration groups : buildAgentGroups )
382         {
383             if ( groups.getName().equals( buildAgentGroup.getName() ) )
384             {
385                 throw new ConfigurationException( "Unable to add build agent group: build agent group already exist" );
386             }
387         }
388 
389         buildAgentGroups.add( buildAgentGroup );
390         generalConfiguration.setBuildAgentGroups( buildAgentGroups );
391     }
392 
393     public void removeBuildAgentGroup( BuildAgentGroupConfiguration buildAgentGroup )
394         throws ConfigurationException
395     {
396         List<BuildAgentGroupConfiguration> buildAgentGroups = generalConfiguration.getBuildAgentGroups();
397         if ( buildAgentGroups != null )
398         {
399             for ( BuildAgentGroupConfiguration groups : buildAgentGroups )
400             {
401                 if ( groups.getName().equals( buildAgentGroup.getName() ) )
402                 {
403                     buildAgentGroups.remove( groups );
404                     break;
405                 }
406             }
407             generalConfiguration.setBuildAgentGroups( buildAgentGroups );
408         }
409     }
410 
411     public void updateBuildAgentGroup( BuildAgentGroupConfiguration buildAgentGroup )
412         throws ConfigurationException
413     {
414         List<BuildAgentGroupConfiguration> buildAgentGroups = generalConfiguration.getBuildAgentGroups();
415         if ( buildAgentGroups != null )
416         {
417             for ( BuildAgentGroupConfiguration groups : buildAgentGroups )
418             {
419                 if ( groups.getName().equals( buildAgentGroup.getName() ) )
420                 {
421                     groups.setName( buildAgentGroup.getName() );
422                     groups.setBuildAgents( buildAgentGroup.getBuildAgents() );
423 
424                     return;
425                 }
426             }
427         }
428 
429     }
430 
431     public void addBuildAgent( BuildAgentGroupConfiguration buildAgentGroup, BuildAgentConfiguration buildAgent )
432         throws ConfigurationException
433     {
434         List<BuildAgentGroupConfiguration> buildAgentGroupConfiguration = generalConfiguration.getBuildAgentGroups();
435         if ( buildAgentGroupConfiguration != null )
436         {
437             for ( BuildAgentGroupConfiguration group : buildAgentGroupConfiguration )
438             {
439                 if ( group.getName().equals( buildAgentGroup.getName() ) )
440                 {
441                     List<BuildAgentConfiguration> agents = group.getBuildAgents();
442 
443                     for ( BuildAgentConfiguration agent : agents )
444                     {
445                         if ( agent.getUrl().equals( buildAgent.getUrl() ) )
446                         {
447                             throw new ConfigurationException( "Unable to add build agent : build agent already exist" );
448                         }
449                     }
450                     group.addBuildAgent( buildAgent );
451                     break;
452                 }
453             }
454             generalConfiguration.setBuildAgentGroups( buildAgentGroupConfiguration );
455         }
456     }
457 
458     public void removeBuildAgent( BuildAgentGroupConfiguration buildAgentGroup, BuildAgentConfiguration buildAgent )
459         throws ConfigurationException
460     {
461         List<BuildAgentGroupConfiguration> buildAgentGroupConfiguration = generalConfiguration.getBuildAgentGroups();
462         if ( buildAgentGroupConfiguration != null )
463         {
464             for ( BuildAgentGroupConfiguration group : buildAgentGroupConfiguration )
465             {
466                 if ( group.getName().equals( buildAgentGroup.getName() ) )
467                 {
468                     List<BuildAgentConfiguration> agents = group.getBuildAgents();
469 
470                     for ( BuildAgentConfiguration agent : agents )
471                     {
472                         if ( agent.getUrl().equals( buildAgent.getUrl() ) )
473                         {
474                             group.removeBuildAgent( agent );
475                             break;
476                         }
477                     }
478                 }
479             }
480             generalConfiguration.setBuildAgentGroups( buildAgentGroupConfiguration );
481         }
482     }
483 
484     public BuildAgentGroupConfiguration getBuildAgentGroup( String name )
485     {
486         List<BuildAgentGroupConfiguration> buildAgentGroupConfiguration = generalConfiguration.getBuildAgentGroups();
487         if ( buildAgentGroupConfiguration != null )
488         {
489             for ( BuildAgentGroupConfiguration buildAgentGroup : buildAgentGroupConfiguration )
490             {
491                 if ( buildAgentGroup.getName().equals( name ) )
492                 {
493                     return buildAgentGroup;
494                 }
495             }
496         }
497 
498         return null;
499     }
500 
501     public BuildAgentConfiguration getBuildAgent( String url )
502     {
503         List<BuildAgentConfiguration> buildAgents = generalConfiguration.getBuildAgents();
504         if ( buildAgents == null )
505         {
506             buildAgents = new ArrayList<BuildAgentConfiguration>();
507         }
508 
509         for ( BuildAgentConfiguration agent : buildAgents )
510         {
511             if ( agent.getUrl().equals( url ) )
512             {
513                 return agent;
514             }
515         }
516         return null;
517     }
518 
519     public List<BuildAgentGroupConfiguration> getBuildAgentGroups()
520     {
521         return generalConfiguration.getBuildAgentGroups();
522     }
523 
524     public boolean containsBuildAgentUrl( String buildAgentUrl, BuildAgentGroupConfiguration buildAgentGroup )
525     {
526         BuildAgentGroupConfiguration group = this.getBuildAgentGroup( buildAgentGroup.getName() );
527         List<BuildAgentConfiguration> buildAgents = group.getBuildAgents();
528         if ( buildAgents == null )
529         {
530             buildAgents = new ArrayList<BuildAgentConfiguration>();
531         }
532 
533         for ( BuildAgentConfiguration agent : buildAgents )
534         {
535             if ( agent.getUrl().equals( buildAgentUrl ) )
536             {
537                 return true;
538             }
539         }
540         return false;
541     }
542 
543     // ----------------------------------------------------------------------
544     //
545     // ----------------------------------------------------------------------
546 
547 
548     public File getBuildOutputDirectory( int projectId )
549     {
550         File dir = new File( getBuildOutputDirectory(), Integer.toString( projectId ) );
551 
552         try
553         {
554             dir = dir.getCanonicalFile();
555         }
556         catch ( IOException e )
557         {
558         }
559 
560         return dir;
561     }
562 
563     public File getTestReportsDirectory( int buildId, int projectId )
564         throws ConfigurationException
565     {
566         File ouputDirectory = getBuildOutputDirectory( projectId );
567 
568         return new File(
569             ouputDirectory.getPath() + File.separatorChar + buildId + File.separatorChar + "surefire-reports" );
570 
571     }
572 
573     public File getBuildOutputFile( int buildId, int projectId )
574         throws ConfigurationException
575     {
576         File dir = getBuildOutputDirectory( projectId );
577 
578         if ( !dir.exists() && !dir.mkdirs() )
579         {
580             throw new ConfigurationException(
581                 "Could not make the build output directory: " + "'" + dir.getAbsolutePath() + "'." );
582         }
583 
584         return new File( dir, buildId + ".log.txt" );
585     }
586 
587     public File getReleaseOutputDirectory( int projectGroupId )
588     {
589         if ( getReleaseOutputDirectory() == null )
590         {
591             return null;
592         }
593 
594         File dir = new File( getReleaseOutputDirectory(), Integer.toString( projectGroupId ) );
595 
596         try
597         {
598             dir = dir.getCanonicalFile();
599         }
600         catch ( IOException e )
601         {
602         }
603 
604         return dir;
605     }
606 
607     public File getReleaseOutputFile( int projectGroupId, String name )
608         throws ConfigurationException
609     {
610         File dir = getReleaseOutputDirectory( projectGroupId );
611 
612         if ( dir == null )
613         {
614             return null;
615         }
616 
617         if ( !dir.exists() && !dir.mkdirs() )
618         {
619             throw new ConfigurationException(
620                 "Could not make the release output directory: " + "'" + dir.getAbsolutePath() + "'." );
621         }
622 
623         return new File( dir, name + ".log.txt" );
624     }
625 
626     public String getReleaseOutput( int projectGroupId, String name )
627         throws ConfigurationException
628     {
629         File file = getReleaseOutputFile( projectGroupId, name );
630 
631         try
632         {
633             if ( file.exists() )
634             {
635                 return FileUtils.fileRead( file.getAbsolutePath() );
636             }
637             else
638             {
639                 return "There is no output for this release.";
640             }
641         }
642         catch ( IOException e )
643         {
644             log.warn( "Error reading release output for release '" + name + "'.", e );
645             return null;
646         }
647     }
648 
649     public int getNumberOfBuildsInParallel()
650     {
651         return generalConfiguration.getNumberOfBuildsInParallel();
652     }
653 
654     public void setNumberOfBuildsInParallel( int num )
655     {
656         generalConfiguration.setNumberOfBuildsInParallel( num );
657     }
658 
659     public String getSharedSecretPassword()
660     {
661         return generalConfiguration.getSharedSecretPassword();
662     }
663 
664     public void setSharedSecretPassword( String sharedSecretPassword )
665     {
666         generalConfiguration.setSharedSecretPassword( sharedSecretPassword );
667     }
668 
669     // ----------------------------------------------------------------------
670     //
671     // ----------------------------------------------------------------------
672 
673     public File getFile( String filename )
674     {
675         if ( filename == null )
676         {
677             return null;
678         }
679 
680         File f = null;
681 
682         if ( filename.length() != 0 )
683         {
684             f = new File( filename );
685 
686             if ( !f.isAbsolute() )
687             {
688                 f = new File( applicationHome, filename );
689             }
690         }
691 
692         try
693         {
694             if ( f != null )
695             {
696                 return f.getCanonicalFile();
697             }
698             return null;
699         }
700         catch ( IOException e )
701         {
702             return f;
703         }
704     }
705 
706     // ----------------------------------------------------------------------
707     // Load and Store
708     // ----------------------------------------------------------------------
709 
710     public boolean isLoaded()
711     {
712         return loaded;
713     }
714 
715 
716     private void loadData()
717         throws ConfigurationLoadingException, ContinuumConfigurationException
718     {
719         generalConfiguration = configuration.getGeneralConfiguration();
720 
721         try
722         {
723             systemConf = getSystemConfigurationDao().getSystemConfiguration();
724 
725             if ( systemConf == null )
726             {
727                 systemConf = new SystemConfiguration();
728                 systemConf = getSystemConfigurationDao().addSystemConfiguration( systemConf );
729             }
730 
731             loaded = true;
732         }
733         catch ( ContinuumStoreException e )
734         {
735             throw new ConfigurationLoadingException( "Error reading configuration from database.", e );
736         }
737     }
738 
739     public void reload()
740         throws ConfigurationLoadingException, ContinuumConfigurationException
741     {
742         configuration.reload();
743         loadData();
744     }
745 
746     public void store()
747         throws ConfigurationStoringException, ContinuumConfigurationException
748     {
749         configuration.setGeneralConfiguration( generalConfiguration );
750 
751         configuration.save();
752     }
753 
754     public Schedule getDefaultSchedule()
755         throws ContinuumStoreException, ConfigurationLoadingException, ContinuumConfigurationException,
756         BuildQueueServiceException
757     {
758         // Schedule
759         Schedule defaultSchedule = scheduleDao.getScheduleByName( DEFAULT_SCHEDULE_NAME );
760 
761         if ( defaultSchedule == null )
762         {
763             defaultSchedule = createDefaultSchedule();
764 
765             defaultSchedule = scheduleDao.addSchedule( defaultSchedule );
766         }
767 
768         return defaultSchedule;
769     }
770 
771     public BuildQueue getDefaultBuildQueue()
772         throws BuildQueueServiceException
773     {
774         BuildQueue defaultBuildQueue = buildQueueService.getBuildQueueByName( DEFAULT_BUILD_QUEUE_NAME );
775 
776         if ( defaultBuildQueue == null )
777         {
778             defaultBuildQueue = createDefaultBuildQueue();
779 
780             defaultBuildQueue = buildQueueService.addBuildQueue( defaultBuildQueue );
781         }
782 
783         return defaultBuildQueue;
784     }
785 
786     // ----------------------------------------------------------------------
787     //
788     // ----------------------------------------------------------------------
789 
790     private Schedule createDefaultSchedule()
791         throws ConfigurationLoadingException, ContinuumConfigurationException, ContinuumStoreException,
792         BuildQueueServiceException
793     {
794 
795         log.info( "create Default Schedule" );
796 
797         Schedule schedule = new Schedule();
798 
799         schedule.setName( DEFAULT_SCHEDULE_NAME );
800 
801         //It shouldn't be possible
802         if ( systemConf == null )
803         {
804             this.reload();
805         }
806 
807         schedule.setDescription( systemConf.getDefaultScheduleDescription() );
808 
809         schedule.setCronExpression( systemConf.getDefaultScheduleCronExpression() );
810 
811         schedule.setActive( true );
812 
813         BuildQueue buildQueue = getDefaultBuildQueue();
814 
815         schedule.addBuildQueue( buildQueue );
816 
817         return schedule;
818     }
819 
820     private BuildQueue createDefaultBuildQueue()
821     {
822         log.info( "create Default Build Queue" );
823 
824         BuildQueue buildQueue = new BuildQueue();
825 
826         buildQueue.setName( DEFAULT_BUILD_QUEUE_NAME );
827 
828         return buildQueue;
829     }
830 }