code: public void buildProject(File projectRoot) {
          if (projectRoot == null) {
              throw new NullPointerException("projectRoot");
          }
          if (mainClass == null) {
              throw new IllegalArgumentException("No main class specified");
          }
          mainClassName = mainClass.substring(mainClass.lastIndexOf('.') + 1);
  
          if (executable == null || executable.length() == 0) {
              executable = mainClassName;
          }
          if (appName == null || appName.length() == 0) {
              appName = mainClassName;
          }
          if (packageName == null || packageName.length() == 0) {
              int index = mainClass.lastIndexOf('.');
              if (index == -1) {
                  packageName = "";
              } else {
                  packageName = mainClass.substring(0, index);
              }
          }
          packageDirName = packageName.replace('.', '/');
          if (appId == null || appId.length() == 0) {
              appId = packageName;
              if (appId == null || appId.length() == 0) {
                  appId = mainClassName;
              }
          }
  
          try {
              File targetFile = new File(projectRoot, FilenameUtils.getBaseName(templateURL.getPath()));
              FileUtils.copyURLToFile(templateURL, targetFile);
              extractArchive(targetFile, targetFile.getParentFile());
              targetFile.delete();
          } catch (IOException e) {
              throw new Error(e);
          }
      }
docs: Builds the project and stores it at the specified {@code projectRoot}.
  You need to have specified at least the main class name for the project
  to be built.
  
  @param projectRoot
  
  @throws NullPointerException if {@code projectRoot == null}.
  @throws IllegalArgumentException if no main class had been specified.