class GenerateMojo extends AbstractMojo {

  @Override
  public void execute() {

    checkConfig();

    if (MavenPluginUtil.isParentProject(project)) {
      for (MavenProject subProject : project.getCollectedProjects()) {
        generateContract(subProject);
        generateDocument(subProject);
      }
      generateContract(project);
      generateDocument(project);
      generateCode(project);
    } else {
      generateContract(project);
      generateDocument(project);
      generateCode(project);
    }
  }

}