void checkBuildProduct(File productDir, File baseDir, File distDir, File jarDir) {
    if (!shouldBuild(productDir.getPath())) {
      return;
    }
    assertTrue(null != productDir);
    assertTrue(productDir.canRead());

    checkJavac();

    BuildModule task = new BuildModule();
    Project project = new Project();
    task.setProject(project);
    assertTrue(jarDir.canWrite() || jarDir.mkdirs());
    tempFiles.add(jarDir);
    task.setJardir(new Path(project, jarDir.getAbsolutePath()));
    task.setProductdir(new Path(project, productDir.getAbsolutePath()));
    task.setBasedir(new Path(project, baseDir.getAbsolutePath()));
    task.setDistdir(new Path(project, distDir.getAbsolutePath()));
    task.setFailonerror(true);
    if (null != BUILD_CONFIG) {
      task.setBuildConfig(BUILD_CONFIG);
    }
    // task.setVerbose(true);
    task.setCreateinstaller(true);
    task.execute();
    // now run installer and do product tests?
  }
 File doTask(String module, boolean trimTesting, boolean assembleAll, boolean keepJars) {
   BuildModule task = getTask(module);
   String name = name(module, trimTesting, assembleAll);
   File jar = new File(getJarDir(), name + ".jar");
   task.setAssembleall(assembleAll);
   task.setTrimtesting(trimTesting);
   task.execute();
   if (!jar.canRead()) {
     File[] files = getJarDir().listFiles();
     fail("cannot read " + jar + " in " + Arrays.asList(files));
   }
   if (!keepJars && deleteJars) {
     deleteTempFiles();
   }
   return jar;
 }