docs: public Metadata getMetadata( String path )
          throws IOException, MetadataNotFoundException
      {
          boolean found = false;
          Metadata result = new Metadata();
          Set<String> pluginArtifactIds = new HashSet<String>();
          Set<String> snapshotVersions = new HashSet<String>();
          for ( int i = 0; i < stores.length; i++ )
          {
              try
              {
                  Metadata partial = stores[i].getMetadata( path );
                  if ( StringUtils.isEmpty( result.getArtifactId() ) && !StringUtils.isEmpty( partial.getArtifactId() ) )
                  {
                      result.setArtifactId( partial.getArtifactId() );
                      found = true;
                  }
                  if ( StringUtils.isEmpty( result.getGroupId() ) && !StringUtils.isEmpty( partial.getGroupId() ) )
                  {
                      result.setGroupId( partial.getGroupId() );
                      found = true;
                  }
                  if ( StringUtils.isEmpty( result.getVersion() ) && !StringUtils.isEmpty( partial.getVersion() ) )
                  {
                      result.setVersion( partial.getVersion() );
                      found = true;
                  }
                  if ( partial.getPlugins() != null && !partial.getPlugins().isEmpty() )
                  {
                      for ( Plugin plugin : partial.getPlugins() )
                      {
                          if ( !pluginArtifactIds.contains( plugin.getArtifactId() ) )
                          {
                              result.addPlugin( plugin );
                              pluginArtifactIds.add( plugin.getArtifactId() );
                          }
                      }
                      found = true;
                  }
                  if ( partial.getVersioning() != null )
                  {
                      Versioning rVers = result.getVersioning();
                      if ( rVers == null )
                      {
                          rVers = new Versioning();
                      }
                      Versioning pVers = partial.getVersioning();
                      String rLU = found ? rVers.getLastUpdated() : null;
                      String pLU = pVers.getLastUpdated();
                      if ( pLU != null && ( rLU == null || rLU.compareTo( pLU ) < 0 ) )
                      {
                          // partial is newer or only
                          if ( !StringUtils.isEmpty( pVers.getLatest() ) )
                          {
                              rVers.setLatest( pVers.getLatest() );
                          }
  
                          if ( !StringUtils.isEmpty( pVers.getRelease() ) )
                          {
                              rVers.setLatest( pVers.getRelease() );
                          }
                          rVers.setLastUpdated( pVers.getLastUpdated() );
                      }
                      for ( String version : pVers.getVersions() )
                      {
                          if ( !rVers.getVersions().contains( version ) )
                          {
                              rVers.addVersion( version );
                          }
                      }
                      if ( pVers.getSnapshot() != null )
                      {
                          if ( rVers.getSnapshot() == null
                              || pVers.getSnapshot().getBuildNumber() > rVers.getSnapshot().getBuildNumber() )
                          {
                              Snapshot snapshot = new Snapshot();
                              snapshot.setBuildNumber( pVers.getSnapshot().getBuildNumber() );
                              snapshot.setTimestamp( pVers.getSnapshot().getTimestamp() );
                              rVers.setSnapshot( snapshot );
                          }
                      }
                      try
                      {
                          if ( pVers.getSnapshotVersions() != null && !pVers.getSnapshotVersions().isEmpty() )
                          {
                              for ( SnapshotVersion snapshotVersion : pVers.getSnapshotVersions() )
                              {
                                  String key = snapshotVersion.getVersion() + "-" + snapshotVersion.getClassifier() + "."
                                      + snapshotVersion.getExtension();
                                  if ( !snapshotVersions.contains( key ) )
                                  {
                                      rVers.addSnapshotVersion( snapshotVersion );
                                      snapshotVersions.add( key );
                                  }
                              }
                          }
                      }
                      catch ( NoSuchMethodError e )
                      {
                          // Maven 2
                      }
  
                      result.setVersioning( rVers );
                      found = true;
                  }
              }
              catch ( MetadataNotFoundException e )
              {
                  // ignore
              }
          }
          if ( !found )
          {
              throw new MetadataNotFoundException( path );
          }
          return result;
      }