@Override
   public void execute() throws BuildException {
      super.execute();

      if (jdeHome == null) {
         throw new BuildException("jdehome not set");
      }

      File lib = new File(jdeHome, "lib");
      if (lib.isDirectory()) {
         Path apiPath = new Path(getProject());
         apiPath.setLocation(new File(lib, "net_rim_api.jar"));
         imports.add(apiPath);
      } else {
         throw new BuildException("jde home missing \"lib\" directory");
      }

      if (output == null) {
         throw new BuildException("output is a required attribute");
      }

      if (destDir == null) {
         destDir = getProject().getBaseDir();
      } else {
         if (!destDir.isDirectory()) {
            throw new BuildException("destdir must be a directory");
         }
      }

      if (srcs.size() == 0) {
         throw new BuildException("srcdir attribute or <src> element required!");
      }

      String[] files = srcs.list();
      srcs = new Path(getProject());
      File f;

      // iterate through all source files
      for (String file : files) {
         f = new File(file);

         // when source file is actually a directory, create fileset
         if (f.isDirectory()) {
            FileSet fs = new FileSet();
            fs.setDir(f);
            srcs.addFileset(fs);
         } else { // otherwise add the source file back into the path object
            srcs.setLocation(f);
         }
      }

      // blackberry jde will create this file and pass it to the rapc command
      jdp.writeManifest(new File(destDir, output+".rapc"), output);

      if (!Utils.isUpToDate(srcs, new File(destDir, output+".cod"))) {
         log(String.format("Compiling %d source files to %s", srcs.size(), output+".cod"));
         executeRapc();
      } else {
         log("Compilation skipped, cod is up to date", Project.MSG_VERBOSE);
      }
   }