示例#1
0
 public BuildTask toBuildTask(CRBuildTask crBuildTask) {
   BuildTask buildTask;
   switch (crBuildTask.getType()) {
     case rake:
       buildTask = new RakeTask();
       break;
     case ant:
       buildTask = new AntTask();
       break;
     case nant:
       buildTask = new NantTask();
       break;
     default:
       throw new RuntimeException(
           String.format("unknown type of build task '%s'", crBuildTask.getType()));
   }
   setCommonBuildTaskMembers(buildTask, crBuildTask);
   setCommonTaskMembers(buildTask, crBuildTask);
   return buildTask;
 }
示例#2
0
 private void setCommonBuildTaskMembers(BuildTask buildTask, CRBuildTask crBuildTask) {
   buildTask.buildFile = crBuildTask.getBuildFile();
   buildTask.target = crBuildTask.getTarget();
   buildTask.workingDirectory = crBuildTask.getWorkingDirectory();
 }