Fork me on GitHub

CPD Results

The following document contains the results of PMD's CPD 7.7.0.

Duplications

File Line
gov/nist/secauto/metaschema/maven/plugin/GenerateSchemaMojo.java 259
gov/nist/secauto/metaschema/maven/plugin/GenerateSourcesMojo.java 145
getBuildContext().refresh(getOutputDirectory());
    }
    // // add generated sources to Maven
    // try {
    // getMavenProject()..addCompileSourceRoot(getOutputDirectory().getCanonicalFile().getPath());
    // } catch (IOException ex) {
    // throw new MojoExecutionException("Unable to add output directory to maven
    // sources.", ex);
    // }
  }

  @SuppressWarnings("PMD.AvoidCatchingGenericException")
  private void performGeneration() throws MojoExecutionException {
    File outputDir = getOutputDirectory();
    if (getLog().isDebugEnabled()) {
      getLog().debug(String.format("Using outputDirectory: %s", outputDir.getPath()));
    }

    if (!outputDir.exists() && !outputDir.mkdirs()) {
      throw new MojoExecutionException("Unable to create output directory: " + outputDir);
    }

    IBindingContext bindingContext;
    try {
      bindingContext = newBindingContext();
    } catch (MetaschemaException | IOException ex) {
      throw new MojoExecutionException("Failed to create the binding context", ex);
    }