code: public void identifyPrimaryConfiguration() throws MojoExecutionException
      {
          Set<String> configurationNames = new HashSet<String>();
          for ( BuildConfiguration configuration : configurations )
          {
              if ( configurationNames.contains( configuration.getName() ) )
              {
                  throw new MojoExecutionException( "Duplicate configuration '" + configuration.getName()
                          + "' for '" + getName() + "', configuration names must be unique" );
              }
              configurationNames.add( configuration.getName() );
              configuration.setPrimary( false );
          }
          if ( configurations.contains( RELEASE_CONFIGURATION ) )
          {
              configurations.get( configurations.indexOf( RELEASE_CONFIGURATION ) ).setPrimary( true );
          }
          else if ( configurations.contains( DEBUG_CONFIGURATION ) )
          {
              configurations.get( configurations.indexOf( DEBUG_CONFIGURATION ) ).setPrimary( true );
          }
          else
          {
              configurations.get( 0 ).setPrimary( true );
          }
      }
docs: Check the configurations and mark one as primary.
  @throws MojoExecutionException if duplicate configuration names are found