Path

  1. Hibernate Maven Plugin
  2. Project Reports
  3. CPD


CPD Results

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

Duplications

File Line
de/juplo/plugins/hibernate/CreateMojo.java 41
de/juplo/plugins/hibernate/DropMojo.java 41
public class CreateMojo extends AbstractSchemaMojo
{
  /**
   * Output file.
   * <p>
   * If the specified filename is not absolut, the file will be created
   * relative to the project build directory
   * (<code>project.build.directory</code>).
   *
   * @parameter property="hibernate.schema.create" default-value="create.sql"
   * @since 1.0
   */
  private String outputFile;


  @Override
  public final void execute()
    throws
      MojoFailureException,
      MojoExecutionException
  {
    super.execute(outputFile);
  }


  @Override
  void build(
      MetadataImplementor metadata,
      ExecutionOptions options,
      TargetDescriptor target
      )
      throws
        MojoExecutionException,
        MojoFailureException
  {
    ServiceRegistry service =
        metadata.getMetadataBuildingOptions().getServiceRegistry();
    SchemaManagementTool tool = service.getService(SchemaManagementTool.class);

    Map config = options.getConfigurationValues();
    SourceDescriptor source = new SourceDescriptor()
    {
	  @Override
      public SourceType getSourceType()
      {
        return SourceType.METADATA;
      }

      @Override
      public ScriptSourceInput getScriptSourceInput()
      {
        return null;
      }
    };

    tool.getSchemaCreator(config).doCreation(metadata, options, source, target);

Pages