code: void createTotalSpecifications(final File dir, final String packageDirectory) throws MojoExecutionException {
  
          if (dir.equals(null)) {
              throw new MojoExecutionException("Could not read from directory " + dir.getPath());
          }
          final File[] files = dir.listFiles();
          if (files == null) {
              return;
          }
          final File[] providedContextFiles = dir.listFiles((java.io.FileFilter) FileFilterUtils.andFileFilter(FileFilterUtils.fileFileFilter(), FileFilterUtils.nameFileFilter("providedcontext.json")));
          if (providedContextFiles.length == 1) {
              final File parent = providedContextFiles[0].getParentFile();
              final File outputDir = new File(getSpecificationOutput() + File.separator + packageDirectory.substring(0,packageDirectory.lastIndexOf(File.separator)));
              outputDir.mkdirs();
              try {
                  generateTotalSpecification(parent, outputDir);
              } catch (final CodeGenException e) {
                  throw new MojoExecutionException("Couldn't create total specification",e);
              }
          }
          for (File entry : dir.listFiles()) {
              if (entry.isDirectory()) {
                  createTotalSpecifications(entry, (packageDirectory == null) ? entry.getName() : packageDirectory + File.separator + entry.getName());
              }
          }
      }
docs: /*
  Finds any partial specifications and creates a generated specification